Divacky Roman wrote this message on Sat, Feb 18, 2006 at 18:39 +0100:
> 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.
> 
> 
> ah.. thnx.. the man page should be updated with "he
>      first argument, by convention, should point to the file name associated
>           with the file being executed."
> 
> s/should/must then

Nope.. it need not be the same..  in cases like this:
execl("/usr/bin/gzip", "gunzip", NULL);

will give you gunzip behavior because the gzip binary looks at argv[0]
and changes it's behavior based upon what it finds..  look at crunchgen
for the ability to combine different programs into one binary...

-- 
  John-Mark Gurney                              Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
_______________________________________________
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