summaryrefslogtreecommitdiffstats
path: root/man3/exec.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
commit3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch)
tree3ee7a3ec64525911fa865bb984c86d997d855527 /man3/exec.3
parentAdding debian version 6.05.01-1. (diff)
downloadmanpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz
manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man3/exec.3')
-rw-r--r--man3/exec.335
1 files changed, 17 insertions, 18 deletions
diff --git a/man3/exec.3 b/man3/exec.3
index 0f60f57..caf6d6a 100644
--- a/man3/exec.3
+++ b/man3/exec.3
@@ -11,7 +11,7 @@
.\" Modified, 24 Jun 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added note on casting NULL
.\"
-.TH exec 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH exec 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
execl, execlp, execle, execv, execvp, execvpe \- execute a file
.SH LIBRARY
@@ -20,9 +20,9 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <unistd.h>
-.PP
+.P
.B extern char **environ;
-.PP
+.P
.BI "int execl(const char *" pathname ", const char *" arg ", ..."
.B " /*, (char *) NULL */);"
.BI "int execlp(const char *" file ", const char *" arg ", ..."
@@ -34,12 +34,12 @@ Standard C library
.BI "int execvpe(const char *" file ", char *const " argv \
"[], char *const " envp "[]);"
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR execvpe ():
.nf
_GNU_SOURCE
@@ -54,10 +54,10 @@ The functions described in this manual page are layered on top of
(See the manual page for
.BR execve (2)
for further details about the replacement of the current process image.)
-.PP
+.P
The initial argument for these functions is the name of a file that is
to be executed.
-.PP
+.P
The functions can be grouped based on the letters following the "exec" prefix.
.\"
.SS l - execl(), execlp(), execle()
@@ -77,7 +77,7 @@ The list of arguments
be terminated by a null pointer,
and, since these are variadic functions, this pointer must be cast
.IR "(char\ *) NULL" .
-.PP
+.P
By contrast with the 'l' functions, the 'v' functions (below) specify the
command-line arguments of the executed program as a vector.
.\"
@@ -99,7 +99,7 @@ The
argument is an array of pointers to null-terminated strings and
.I must
be terminated by a null pointer.
-.PP
+.P
All other
.BR exec ()
functions (which do not include 'e' in the suffix)
@@ -121,20 +121,20 @@ a list that includes the directories returned by
(which typically returns the value "/bin:/usr/bin")
and possibly also the current working directory;
see NOTES for further details.
-.PP
+.P
.BR execvpe ()
searches for the program using the value of
.B PATH
from the caller's environment, not from the
.I envp
argument.
-.PP
+.P
If the specified filename includes a slash character, then
.B PATH
is ignored, and the file at the specified pathname is executed.
-.PP
+.P
In addition, certain errors are treated specially.
-.PP
+.P
If permission is denied for a file (the attempted
.BR execve (2)
failed with the error
@@ -145,7 +145,7 @@ they will return with
.I errno
set to
.BR EACCES .
-.PP
+.P
If the header of a file isn't recognized (the attempted
.BR execve (2)
failed with the error
@@ -154,7 +154,7 @@ these functions will execute the shell
.RI ( /bin/sh )
with the path of the file as its first argument.
(If this attempt fails, no further searching is done.)
-.PP
+.P
All other
.BR exec ()
functions (which do not include 'p' in the suffix)
@@ -195,7 +195,6 @@ T{
.BR execvpe ()
T} Thread safety MT-Safe env
.TE
-.sp 1
.SH VERSIONS
The default search path (used when the environment
does not contain the variable \fBPATH\fR)
@@ -218,7 +217,7 @@ caused the current working directory to be dropped altogether
from the default search path.
This accidental behavior change is considered mildly beneficial,
and won't be reverted.
-.PP
+.P
The behavior of
.BR execlp ()
and
@@ -232,7 +231,7 @@ sleep and retry if
is encountered.
Linux treats it as a hard
error and returns immediately.
-.PP
+.P
Traditionally, the functions
.BR execlp ()
and