This is the mail archive of the libc-alpha@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: [PATCH] Documentation: Update process creation documention with Linux specific notes


On Fri, Jun 14, 2013 at 11:25 AM, Roland McGrath <roland@hack.frob.com> wrote:
> The libc manual documents what the API is, not what happens when you invoke
> undefined behavior.

Sure. My patch is in response to a recommendation from the libc-help
list while discussing what happens when NULL is passed.  It was
thought that documenting what occurs in this case would be useful.

Since the stub for execve() does do an argument check, and the Linux
specific implementation does not, this change could be viewed as
documentation of the Linux specific implementation.

Also, it appears that this "feature" is not well documented, adding
this change helps when similar code is discovered.  In our case, we
spent several hours researching why our use of execve() with NULL
parameters did not fail as it seemed it should (and our static
analysis tool said it should).  Had this been documented, we would
have known.

Anyway, feel free to file this patch in the bitbucket.  I've submitted
a patch to linux-man (where there is already mention of argv being
NULL).  And perhaps documentation there would be enough.

Thanks,
Pete


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