The const char *arg and subsequent ellipses in the execl, execlp, and

execle functions can be thought of as arg0, arg1, ..., argn.   Together
they describe a list of one or more pointers to null-terminated strings
that represent the argument list available  to  the  executed  program.
The  first argument, by convention, should point to the file name asso-
ciated with the file being executed.  The list  of  arguments  must  be
terminated  by a NULL pointer, and, since these are variadic functions,
this pointer must be cast (char *) NULL.


SVN revision: 14411
This commit is contained in:
sebastid 2005-04-27 14:30:36 +00:00 committed by sebastid
parent 2facd89808
commit 886713a310
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ ecore_exe_run(const char *exe_cmd, const void *data)
return exe;
}
setsid();
execl("/bin/sh", "/bin/sh", "-c", exe_cmd, NULL);
execl("/bin/sh", "/bin/sh", "-c", exe_cmd, (char *)NULL);
exit(0);
return NULL;
}