exec.3: Rewrite description of PATH and mention _CS_PATH

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2010-09-23 17:23:59 +02:00
parent c54ed37e0a
commit 76e2566b03
1 changed files with 14 additions and 7 deletions

View File

@ -36,7 +36,7 @@
.\" Modified, 24 Jun 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added note on casting NULL
.\"
.TH EXEC 3 2009-02-22 "GNU" "Linux Programmer's Manual"
.TH EXEC 3 2010-09-23 "GNU" "Linux Programmer's Manual"
.SH NAME
execl, execlp, execle, execv, execvp \- execute a file
.SH SYNOPSIS
@ -121,17 +121,24 @@ image from the external variable
in the current process.
.SS Special semantics for execlp() and execvp()
.PP
The functions
The
.BR execlp ()
and
.BR execvp ()
will duplicate the actions of the shell in searching for an executable file
functions duplicate the actions of the shell in
searching for an executable file
if the specified filename does not contain a slash (/) character.
The search path is the path specified in the environment by the
The file is sought in the colon-separated list of directory pathnames
specified in the
.B PATH
variable.
If this variable isn't specified, the default path
":/bin:/usr/bin" is used.
environment variable.
If this variable isn't defined, the path list defaults to
the current directory followed by the list of directories returned by
.IR confstr(_CS_PATH) .
(This
.BR confstr (3)
call typically returns the value "/bin:/usr/bin".)
In addition, certain
errors are treated specially.
.PP