This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Arguments to execve
- From: Peter LaDow <petela at gocougs dot wsu dot edu>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: libc-help at sourceware dot org
- Date: Tue, 11 Jun 2013 14:30:14 -0700
- Subject: Re: Arguments to execve
- References: <CAN8Q1Ed1KDrmjbSxd74XVQFWEUvbbpaq0dQFJ9OLPapgxf2pyw at mail dot gmail dot com> <51B78BCC dot 1020400 at redhat dot com> <CAN8Q1Ec31RbOSJZ-6wDkyE6+eD+HAsRPxzVUGYHuwXnx==QFXA at mail dot gmail dot com> <51B7925B dot 9060605 at redhat dot com>
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