]> git.saurik.com Git - apple/libc.git/blame - gen/FreeBSD/exec.3.patch
Libc-763.12.tar.gz
[apple/libc.git] / gen / FreeBSD / exec.3.patch
CommitLineData
1f2f436a
A
1--- exec.3.orig 2009-12-15 13:07:38.000000000 -0800
2+++ exec.3 2009-12-15 13:09:07.000000000 -0800
3@@ -33,9 +33,8 @@
224c7076
A
4 .Os
5 .Sh NAME
59e0d9fe 6 .Nm execl ,
224c7076 7-.Nm execlp ,
59e0d9fe
A
8 .Nm execle ,
9-.Nm exect ,
224c7076 10+.Nm execlp ,
59e0d9fe 11 .Nm execv ,
3d9156a7
A
12 .Nm execvp ,
13 .Nm execvP
1f2f436a 14@@ -46,25 +45,43 @@
224c7076
A
15 .In unistd.h
16 .Vt extern char **environ ;
17 .Ft int
18-.Fn execl "const char *path" "const char *arg" ... /* "(char *)0" */
19-.Ft int
20-.Fn execlp "const char *file" "const char *arg" ... /* "(char *)0" */
21+.Fo execl
22+.Fa "const char *path"
23+.Fa "const char *arg0"
24+.Fa ... /* "(char *)0" */
25+.Fc
26 .Ft int
27 .Fo execle
28-.Fa "const char *path" "const char *arg" ...
29+.Fa "const char *path"
30+.Fa "const char *arg0"
31+.Fa ...
32 .Fa /*
33 .Bk -words
34 .Fa "(char *)0" "char *const envp[]" */
3d9156a7
A
35 .Ek
36 .Fc
59e0d9fe
A
37 .Ft int
38-.Fn exect "const char *path" "char *const argv[]" "char *const envp[]"
224c7076
A
39+.Fo execlp
40+.Fa "const char *file"
41+.Fa "const char *arg0"
42+.Fa ... /* "(char *)0" */
43+.Fc
59e0d9fe 44 .Ft int
224c7076
A
45-.Fn execv "const char *path" "char *const argv[]"
46+.Fo execv
47+.Fa "const char *path"
48+.Fa "char *const argv[]"
49+.Fc
50 .Ft int
51-.Fn execvp "const char *file" "char *const argv[]"
52+.Fo execvp
53+.Fa "const char *file"
54+.Fa "char *const argv[]"
55+.Fc
56 .Ft int
57-.Fn execvP "const char *file" "const char *search_path" "char *const argv[]"
58+.Fo execvP
59+.Fa "const char *file"
60+.Fa "const char *search_path"
61+.Fa "char *const argv[]"
62+.Fc
63 .Sh DESCRIPTION
64 The
65 .Nm exec
1f2f436a 66@@ -80,7 +97,7 @@ The initial argument for these functions
224c7076
A
67 is to be executed.
68 .Pp
69 The
70-.Fa "const char *arg"
71+.Fa "const char *arg0"
72 and subsequent ellipses in the
73 .Fn execl ,
74 .Fn execlp ,
1f2f436a 75@@ -102,7 +119,6 @@ be terminated by a
59e0d9fe
A
76 pointer.
77 .Pp
78 The
79-.Fn exect ,
3d9156a7
A
80 .Fn execv ,
81 .Fn execvp ,
59e0d9fe 82 and
1f2f436a 83@@ -119,10 +135,8 @@ pointer.
59e0d9fe
A
84 .Pp
85 The
86 .Fn execle
87-and
88-.Fn exect
89-functions also specify the environment of the executed process by following
224c7076
A
90-the
91+function also specifies the environment of the executed process
92+by following the
59e0d9fe
A
93 .Dv NULL
94 pointer that terminates the list of arguments in the argument list
224c7076 95 or the pointer to the argv array with an additional argument.
1f2f436a 96@@ -199,11 +213,6 @@ returned
59e0d9fe
A
97 these functions will execute the shell with the path of
98 the file as its first argument.
99 (If this attempt fails, no further searching is done.)
100-.Pp
101-The function
102-.Fn exect
103-executes a file with the program tracing facilities enabled (see
104-.Xr ptrace 2 ) .
105 .Sh RETURN VALUES
106 If any of the
107 .Fn exec
1f2f436a 108@@ -277,7 +286,7 @@ The
224c7076
A
109 .Fn execl ,
110 .Fn execle ,
111 .Fn execlp ,
112-.Fn execvp
113+.Fn execvp ,
114 and
115 .Fn execvP
116 functions
1f2f436a 117@@ -289,11 +298,8 @@ and
59e0d9fe
A
118 .Xr malloc 3 .
119 .Pp
120 The
121-.Fn exect
122-and
123 .Fn execv
124-functions
224c7076
A
125-may fail and set
126+function may fail and set
59e0d9fe
A
127 .Va errno
128 for any of the errors specified for the library function
224c7076 129 .Xr execve 2 .
1f2f436a 130@@ -301,7 +307,6 @@ for any of the errors specified for the
224c7076
A
131 .Xr sh 1 ,
132 .Xr execve 2 ,
133 .Xr fork 2 ,
134-.Xr ktrace 2 ,
135 .Xr ptrace 2 ,
136 .Xr environ 7
1f2f436a
A
137 .Sh STANDARDS
138@@ -309,7 +314,7 @@ The
224c7076
A
139 .Fn execl ,
140 .Fn execv ,
141 .Fn execle ,
142-.Fn execlp
143+.Fn execlp ,
144 and
145 .Fn execvp
146 functions