]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
execve.2: Some tweaks to Shawn Landden's patch
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 21 Jun 2019 06:00:11 +0000 (08:00 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 21 Jun 2019 06:02:38 +0000 (08:02 +0200)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/execve.2

index 799e48035e363492da749a79a9b56bcf95c01fc4..840562e38ebf09371689bf8d23697a8bc0bc007d 100644 (file)
@@ -324,6 +324,10 @@ will be invoked with the following arguments:
 .in
 .PP
 where
+.I pathname
+is te absolute pathname of the file specified as the first argument of
+.BR execve (),
+and
 .I arg...
 is the series of words pointed to by the
 .I argv
@@ -331,18 +335,20 @@ argument of
 .BR execve (),
 starting at
 .IR argv [1].
+Note that there is no way to get the
+.IR argv[0]
+that was passed to the
+.BR execve ()
+call.
+.\" See the P - preserve-argv[0] option.
+.\" Documentation/admin-guide/binfmt-misc.rst
+.\" https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
 .PP
 For portable use,
 .I optional-arg
 should either be absent, or be specified as a single word (i.e., it
 should not contain white space); see NOTES below.
 .PP
-The interpreter is passed the absolute filename to the file. There is no way to get the argv[0]
-that was passed to the kernel via execve(2).
-+.\" See the P - preserve-argv[0] option.
-+.\" Documentation/admin-guide/binfmt-misc.rst
-+.\" https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
-.PP
 Since Linux 2.6.28,
 .\" commit bf2a9a39639b8b51377905397a5005f444e9a892
 the kernel permits the interpreter of a script to itself be a script.