What is the difference between execl and execv?

I use execv instead of execl. To use execv, I create an array and put arguments that I use with execl in there. Then I put this array into execv

I know I have to use an array of arguments for execv but why? What is the difference between execl and execv?

1

1 Answer

There is no difference other than the format of the arguments. They will both end up calling the same underlying system call execve().

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like