In message: <[EMAIL PROTECTED]>
            Stefan Farfeleder <[EMAIL PROTECTED]> writes:
: On Sat, Feb 18, 2006 at 06:21:52PM +0100, [EMAIL PROTECTED] wrote:
: > On Sat, Feb 18, 2006 at 06:17:18PM +0100, Divacky Roman wrote:
: > >       execl("/bin/ls", NULL);
: > 
: > This is wrong. You must specify arg0 != NULL (POSIX says so) and you
: > must NULL-terminate the *following* list.
: > 
: > E.g.:
: >     execl("/bin/ls", "/bin/ls", NULL);
: > is what you want to do.
: 
: execl("/bin/ls", "/bin/ls", (char *)NULL); as NULL might expand to an
: integer 0.

This is one of the times that the difference is important, since
this function is a varadic one, and you must always cast when passing
through varadic args.

Warner
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to