execveat.2: Note the value of argv[0] passed to script interpreters

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-01-10 09:28:26 +01:00
parent b1724c3de4
commit 18650061b6
1 changed files with 23 additions and 0 deletions

View File

@ -175,6 +175,29 @@ system call is also needed to allow
to be implemented on systems that do not have the
.I /proc
filesystem mounted.
When asked to execute a script file, the
.IR argv[0]
that is passed to the script interpreter is a string of the form
.IR /dev/fd/N
or
.IR /dev/fd/N/P ,
where
.I N
is the number of the file descriptor passed via the
.IR dirfd
argument.
A string of the first form occurs when
.BR AT_EMPTY_PATH
is employed.
A string of the second form occurs when the script is specified via both
.IR dirfd
and
.IR pathname ;
in this case,
.IR P
is the value given in
.IR pathname .
.SH BUGS
The
.B ENOENT