summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/exec.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/exec.3')
-rw-r--r--lib/libc/gen/exec.317
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3
index 3438bec..367d71a 100644
--- a/lib/libc/gen/exec.3
+++ b/lib/libc/gen/exec.3
@@ -65,7 +65,7 @@ new process image.
The functions described in this manual page are front-ends for the function
.Xr execve 2 .
(See the manual page for
-.Xr execve
+.Xr execve 2
for detailed information about the replacement of the current process.)
.Pp
The initial argument for these functions is the pathname of a file which
@@ -148,7 +148,7 @@ used.
In addition, certain errors are treated specially.
.Pp
If permission is denied for a file (the attempted
-.Xr execve
+.Fn execve
returned
.Er EACCES ) ,
these functions will continue searching the rest of
@@ -159,7 +159,7 @@ set to
.Er EACCES .
.Pp
If the header of a file isn't recognized (the attempted
-.Xr execve
+.Fn execve
returned
.Er ENOEXEC ) ,
these functions will execute the shell with the path of
@@ -167,7 +167,7 @@ the file as its first argument.
(If this attempt fails, no further searching is done.)
.Pp
If the file is currently busy (the attempted
-.Xr execve
+.Fn execve
returned
.Er ETXTBUSY ) ,
these functions will sleep for several seconds,
@@ -179,13 +179,13 @@ executes a file with the program tracing facilities enabled (see
.Xr ptrace 2 ) .
.Sh RETURN VALUES
If any of the
-.Xr exec
+.Fn exec
functions returns, an error will have occurred.
The return value is \-1, and the global variable
.Va errno
will be set to indicate the error.
.Sh FILES
-.Bl -tag -width /bin/sh - compact
+.Bl -tag -width /bin/sh -compact
.It Pa /bin/sh
The shell.
.El
@@ -213,10 +213,9 @@ for any of the errors specified for the library function
.Xr sh 1 ,
.Xr execve 2 ,
.Xr fork 2 ,
-.Xr trace 2 ,
-.Xr environ 7 ,
+.Xr ktrace 2 ,
.Xr ptrace 2 ,
-.Xr environ 7 ,
+.Xr environ 7 .
.Sh COMPATIBILITY
Historically, the default path for the
.Fn execlp
OpenPOWER on IntegriCloud