This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Arguments to execve


On Tue, Jun 11, 2013 at 2:10 PM, Carlos O'Donell <carlos@redhat.com> wrote:
> Supporting passing NULL just makes sense. There is no reason to need
> a NULL terminated array if you don't need an envp.

I agree.  And I think that was the though process when this code was
originally written.

But for the sake of discussion, passing NULL for envp violates POSIX
(no?).  And if POSIX compliance is a goal....

And adding the envp parameter to the nonnull attribute only generates
a warning.  Calls using a NULL envp would still function correctly,
but the author would at least be notified of the non-compliance.  Just
a thought.

> The syscall is not likely to change either.

Indeed.  The code in 3.0 vs 3.10 looks nearly identical.  I don't
anticipate a change either.

> Please also feel free to submit a patch for
> glibc's manual/process.texi (execve) section. :-)

Already working on it.  :)

Pete


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]