Lines 25-31
Link Here
|
25 |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
25 |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
26 |
.\" SUCH DAMAGE. |
26 |
.\" SUCH DAMAGE. |
27 |
.\" |
27 |
.\" |
28 |
.Dd March 22, 2020 |
28 |
.Dd December 1, 2023 |
29 |
.Dt EXEC 3 |
29 |
.Dt EXEC 3 |
30 |
.Os |
30 |
.Os |
31 |
.Sh NAME |
31 |
.Sh NAME |
Lines 35-40
Link Here
|
35 |
.Nm exect , |
35 |
.Nm exect , |
36 |
.Nm execv , |
36 |
.Nm execv , |
37 |
.Nm execvp , |
37 |
.Nm execvp , |
|
|
38 |
.Nm execvpe , |
38 |
.Nm execvP |
39 |
.Nm execvP |
39 |
.Nd execute a file |
40 |
.Nd execute a file |
40 |
.Sh LIBRARY |
41 |
.Sh LIBRARY |
Lines 56-61
Link Here
|
56 |
.Ft int |
57 |
.Ft int |
57 |
.Fn execvp "const char *file" "char *const argv[]" |
58 |
.Fn execvp "const char *file" "char *const argv[]" |
58 |
.Ft int |
59 |
.Ft int |
|
|
60 |
.Fn execvpe "const char *file" "char *const argv[]" "char *const envp[]" |
61 |
.Ft int |
59 |
.Fn execvP "const char *file" "const char *search_path" "char *const argv[]" |
62 |
.Fn execvP "const char *file" "const char *search_path" "char *const argv[]" |
60 |
.Sh DESCRIPTION |
63 |
.Sh DESCRIPTION |
61 |
The |
64 |
The |
Lines 97-102
The
Link Here
|
97 |
.Fn exect , |
100 |
.Fn exect , |
98 |
.Fn execv , |
101 |
.Fn execv , |
99 |
.Fn execvp , |
102 |
.Fn execvp , |
|
|
103 |
.Fn execvpe , |
100 |
and |
104 |
and |
101 |
.Fn execvP |
105 |
.Fn execvP |
102 |
functions provide an array of pointers to null-terminated strings that |
106 |
functions provide an array of pointers to null-terminated strings that |
Lines 110-118
be terminated by a
Link Here
|
110 |
pointer. |
114 |
pointer. |
111 |
.Pp |
115 |
.Pp |
112 |
The |
116 |
The |
113 |
.Fn execle |
117 |
.Fn execle , |
|
|
118 |
.Fn exect , |
114 |
and |
119 |
and |
115 |
.Fn exect |
120 |
.Fn execvpe |
116 |
functions also specify the environment of the executed process by following |
121 |
functions also specify the environment of the executed process by following |
117 |
the |
122 |
the |
118 |
.Dv NULL |
123 |
.Dv NULL |
Lines 134-139
Some of these functions have special semantics.
Link Here
|
134 |
The functions |
139 |
The functions |
135 |
.Fn execlp , |
140 |
.Fn execlp , |
136 |
.Fn execvp , |
141 |
.Fn execvp , |
|
|
142 |
.Fn execvpe , |
137 |
and |
143 |
and |
138 |
.Fn execvP |
144 |
.Fn execvP |
139 |
will duplicate the actions of the shell in searching for an executable file |
145 |
will duplicate the actions of the shell in searching for an executable file |
Lines 144-149
For
Link Here
|
144 |
.Fn execlp |
150 |
.Fn execlp |
145 |
and |
151 |
and |
146 |
.Fn execvp , |
152 |
.Fn execvp , |
|
|
153 |
.Fn execvpe , |
147 |
search path is the path specified in the environment by |
154 |
search path is the path specified in the environment by |
148 |
.Dq Ev PATH |
155 |
.Dq Ev PATH |
149 |
variable. |
156 |
variable. |
Lines 269-275
The
Link Here
|
269 |
.Fn execl , |
276 |
.Fn execl , |
270 |
.Fn execle , |
277 |
.Fn execle , |
271 |
.Fn execlp , |
278 |
.Fn execlp , |
272 |
.Fn execvp |
279 |
.Fn execvp , |
|
|
280 |
.Fn execvpe , |
273 |
and |
281 |
and |
274 |
.Fn execvP |
282 |
.Fn execvP |
275 |
functions |
283 |
functions |
Lines 307-312
and
Link Here
|
307 |
functions |
315 |
functions |
308 |
conform to |
316 |
conform to |
309 |
.St -p1003.1-88 . |
317 |
.St -p1003.1-88 . |
|
|
318 |
The |
319 |
.Fn execvpe |
320 |
function is a GNU extension. |
310 |
.Sh HISTORY |
321 |
.Sh HISTORY |
311 |
The |
322 |
The |
312 |
.Fn exec |
323 |
.Fn exec |
Lines 330-335
The
Link Here
|
330 |
.Fn execvP |
341 |
.Fn execvP |
331 |
function first appeared in |
342 |
function first appeared in |
332 |
.Fx 5.2 . |
343 |
.Fx 5.2 . |
|
|
344 |
The |
345 |
.Fn execvpe |
346 |
function first appeared in |
347 |
.Fx 15.0 . |
333 |
.Sh BUGS |
348 |
.Sh BUGS |
334 |
The type of the |
349 |
The type of the |
335 |
.Fa argv |
350 |
.Fa argv |
Lines 340-345
parameters to
Link Here
|
340 |
.Fn exect , |
355 |
.Fn exect , |
341 |
.Fn execv , |
356 |
.Fn execv , |
342 |
.Fn execvp , |
357 |
.Fn execvp , |
|
|
358 |
.Fn execvpe , |
343 |
and |
359 |
and |
344 |
.Fn execvP |
360 |
.Fn execvP |
345 |
is a historical accident and no sane implementation should modify the provided |
361 |
is a historical accident and no sane implementation should modify the provided |