I have a string array in C named args[] - now how can I use this argument list to build the correct execl() call?
So if the array contains:
{"/bin/ls","ls","-a","-l"}
... how can I end up building an execl() call that:
execl("/bin/ls","ls","-a","-l",NULL);
I have to think about it wrong, because I can not find anything on the Internet, just talk about defining functions that can take a variable number of arguments.
source share