]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
exec.3: Minor tweaks to Matthew Kenigsberg's patch
authorMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 13 Jun 2019 19:50:56 +0000 (21:50 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 13 Jun 2019 19:52:57 +0000 (21:52 +0200)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/exec.3

index a0d582bed6aff71739ec05b7eea7657beec596a2..842e12b455f6988772bd0b89b483cc3d1713246f 100644 (file)
@@ -80,7 +80,8 @@ for further details about the replacement of the current process image.)
 The initial argument for these functions is the name of a file that is
 to be executed.
 .PP
-The functions can be grouped based on the letters following exec.
+The functions can be grouped based on the letters following the "exec" prefix.
+.\"
 .SS l - execl(), execlp(), execle()
 .PP
 The
@@ -99,6 +100,10 @@ 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
+By contrast with the 'l' functions, the 'v' functions (below) specify the
+command-line arguments of the executed program as a vector.
+.\"
 .SS v - execv(), execvp(), execvpe()
 .PP
 The
@@ -121,7 +126,8 @@ argument is an array of pointers to null-terminated strings and
 be terminated by a null pointer.
 All other
 .BR exec ()
-functions take the environment for the new process
+functions (which do not include 'e' in the suffix)
+take the environment for the new process
 image from the external variable
 .I environ
 in the calling process.
@@ -166,6 +172,12 @@ 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
+All other
+.BR exec ()
+functions (which do not include 'p' in the suffix)
+take as their first argument a (relative or absolute) pathname
+that identifies the program to be executed.
 .SH RETURN VALUE
 The
 .BR exec ()