]> git.saurik.com Git - apple/libc.git/blob - gen/FreeBSD/exec.3.patch
Libc-763.13.tar.gz
[apple/libc.git] / gen / FreeBSD / exec.3.patch
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 @@
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 @@ -46,25 +45,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 @@ -80,7 +97,7 @@ The initial argument for these functions
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 @@ -102,7 +119,6 @@ be terminated by a
76 pointer.
77 .Pp
78 The
79 -.Fn exect ,
80 .Fn execv ,
81 .Fn execvp ,
82 and
83 @@ -119,10 +135,8 @@ pointer.
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 @@ -199,11 +213,6 @@ returned
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 @@ -277,7 +286,7 @@ The
109 .Fn execl ,
110 .Fn execle ,
111 .Fn execlp ,
112 -.Fn execvp
113 +.Fn execvp ,
114 and
115 .Fn execvP
116 functions
117 @@ -289,11 +298,8 @@ and
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 @@ -301,7 +307,6 @@ for any of the errors specified for the
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 STANDARDS
138 @@ -309,7 +314,7 @@ The
139 .Fn execl ,
140 .Fn execv ,
141 .Fn execle ,
142 -.Fn execlp
143 +.Fn execlp ,
144 and
145 .Fn execvp
146 functions