]> git.saurik.com Git - apple/libc.git/blob - gen/FreeBSD/exec.3.patch
96cdf197b71f44b2f96d43f9e799f3a9a716f432
[apple/libc.git] / gen / FreeBSD / exec.3.patch
1 --- exec.3.orig 2006-09-18 18:04:52.000000000 -0700
2 +++ exec.3 2006-09-18 18:05:37.000000000 -0700
3 @@ -37,9 +37,8 @@
4 .Os
5 .Sh NAME
6 .Nm execl ,
7 -.Nm execlp ,
8 .Nm execle ,
9 -.Nm exect ,
10 +.Nm execlp ,
11 .Nm execv ,
12 .Nm execvp ,
13 .Nm execvP
14 @@ -50,25 +49,43 @@
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[]" */
35 .Ek
36 .Fc
37 .Ft int
38 -.Fn exect "const char *path" "char *const argv[]" "char *const envp[]"
39 +.Fo execlp
40 +.Fa "const char *file"
41 +.Fa "const char *arg0"
42 +.Fa ... /* "(char *)0" */
43 +.Fc
44 .Ft int
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
66 @@ -84,7 +101,7 @@
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 ,
75 @@ -106,7 +123,6 @@
76 pointer.
77 .Pp
78 The
79 -.Fn exect ,
80 .Fn execv ,
81 .Fn execvp ,
82 and
83 @@ -123,10 +139,8 @@
84 .Pp
85 The
86 .Fn execle
87 -and
88 -.Fn exect
89 -functions also specify the environment of the executed process by following
90 -the
91 +function also specifies the environment of the executed process
92 +by following the
93 .Dv NULL
94 pointer that terminates the list of arguments in the argument list
95 or the pointer to the argv array with an additional argument.
96 @@ -203,11 +217,6 @@
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
108 @@ -225,7 +234,7 @@
109 .Fn execl ,
110 .Fn execle ,
111 .Fn execlp ,
112 -.Fn execvp
113 +.Fn execvp ,
114 and
115 .Fn execvP
116 functions
117 @@ -237,11 +246,8 @@
118 .Xr malloc 3 .
119 .Pp
120 The
121 -.Fn exect
122 -and
123 .Fn execv
124 -functions
125 -may fail and set
126 +function may fail and set
127 .Va errno
128 for any of the errors specified for the library function
129 .Xr execve 2 .
130 @@ -249,7 +255,6 @@
131 .Xr sh 1 ,
132 .Xr execve 2 ,
133 .Xr fork 2 ,
134 -.Xr ktrace 2 ,
135 .Xr ptrace 2 ,
136 .Xr environ 7
137 .Sh COMPATIBILITY
138 @@ -272,11 +277,11 @@
139 .Tn POSIX
140 standard.
141 .Pp
142 -Traditionally, the functions
143 +Traditionally, the
144 .Fn execlp
145 and
146 .Fn execvp
147 -ignored all errors except for the ones described above and
148 +functions ignored all errors except for the ones described above and
149 .Er ETXTBSY ,
150 upon which they retried after sleeping for several seconds, and
151 .Er ENOMEM
152 @@ -313,7 +318,7 @@
153 .Fn execl ,
154 .Fn execv ,
155 .Fn execle ,
156 -.Fn execlp
157 +.Fn execlp ,
158 and
159 .Fn execvp
160 functions