execve.2: Elaborate on envp/argv as NULL behavior

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-05-11 08:59:50 +02:00
parent 097547580e
commit eb24aedc69
1 changed files with 8 additions and 3 deletions

View File

@ -496,10 +496,15 @@ and
can be specified as NULL.
In both cases, this has the same effect as specifying the argument
as a pointer to a list containing a single null pointer.
.B "Do not take advantage of this misfeature!"
It is nonstandard and nonportable:
on most other UNIX systems doing this will result in an error
.B "Do not take advantage of this nonstandard and nonportable misfeature!"
On many other UNIX systems, specifying
.I argv
as NULL will result in an error
.RB ( EFAULT ).
.I Some
other UNIX systems treat the
.I envp==NULL
case the same as Linux.
.\" e.g., EFAULT on Solaris 8 and FreeBSD 6.1; but
.\" HP-UX 11 is like Linux -- mtk, Apr 2007
.\" Bug filed 30 Apr 2007: http://bugzilla.kernel.org/show_bug.cgi?id=8408