Sat Sep 27 08:46:56 2014 UTC ()
Consistency in commas. Wording.


(wiz)
diff -r1.24 -r1.25 src/lib/libc/gen/exec.3

cvs diff -r1.24 -r1.25 src/lib/libc/gen/exec.3 (expand / switch to unified diff)

--- src/lib/libc/gen/exec.3 2014/09/26 23:57:26 1.24
+++ src/lib/libc/gen/exec.3 2014/09/27 08:46:56 1.25
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: exec.3,v 1.24 2014/09/26 23:57:26 christos Exp $ 1.\" $NetBSD: exec.3,v 1.25 2014/09/27 08:46:56 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 1991, 1993 3.\" Copyright (c) 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -50,27 +50,27 @@ @@ -50,27 +50,27 @@
50.Ft int 50.Ft int
51.Fn execlp "const char *file" "const char *arg" ... 51.Fn execlp "const char *file" "const char *arg" ...
52.Ft int 52.Ft int
53.Fn execlpe "const char *path" "const char *arg" ... "char *const envp[]" 53.Fn execlpe "const char *path" "const char *arg" ... "char *const envp[]"
54.Ft int 54.Ft int
55.Fn execle "const char *path" "const char *arg" ... "char *const envp[]" 55.Fn execle "const char *path" "const char *arg" ... "char *const envp[]"
56.Ft int 56.Ft int
57.Fn exect "const char *path" "char *const argv[]" "char *const envp[]" 57.Fn exect "const char *path" "char *const argv[]" "char *const envp[]"
58.Ft int 58.Ft int
59.Fn execv "const char *path" "char *const argv[]" 59.Fn execv "const char *path" "char *const argv[]"
60.Ft int 60.Ft int
61.Fn execvp "const char *file" "char *const argv[]" 61.Fn execvp "const char *file" "char *const argv[]"
62.Ft int 62.Ft int
63.Fn execvpe "const char *file" "char *const argv[], char *const envp[]" 63.Fn execvpe "const char *file" "char *const argv[]" "char *const envp[]"
64.Sh DESCRIPTION 64.Sh DESCRIPTION
65The 65The
66.Fn exec 66.Fn exec
67family of functions replaces the current process image with a 67family of functions replaces the current process image with a
68new process image. 68new process image.
69The functions described in this manual page are front-ends for the function 69The functions described in this manual page are front-ends for the function
70.Xr execve 2 . 70.Xr execve 2 .
71(See the manual page for 71(See the manual page for
72.Xr execve 2 72.Xr execve 2
73for detailed information about the replacement of the current process. 73for detailed information about the replacement of the current process.
74The 74The
75.Xr script 7 75.Xr script 7
76manual page provides detailed information about the execution of 76manual page provides detailed information about the execution of
@@ -110,51 +110,51 @@ and @@ -110,51 +110,51 @@ and
110.Fn execvpe 110.Fn execvpe
111functions provide an array of pointers to null-terminated strings that 111functions provide an array of pointers to null-terminated strings that
112represent the argument list available to the new program. 112represent the argument list available to the new program.
113The first argument, by convention, should point to the file name associated 113The first argument, by convention, should point to the file name associated
114with the file being executed. 114with the file being executed.
115The array of pointers 115The array of pointers
116.Sy must 116.Sy must
117be terminated by a 117be terminated by a
118.Dv NULL 118.Dv NULL
119pointer. 119pointer.
120.Pp 120.Pp
121The 121The
122.Fn execle , 122.Fn execle ,
123.Fn execlpe 123.Fn execlpe ,
124and 124and
125.Fn exect 125.Fn exect
126functions also specify the environment of the executed process by following 126functions also specify the environment of the executed process by following
127the 127the
128.Dv NULL 128.Dv NULL
129pointer that terminates the list of arguments in the parameter list 129pointer that terminates the list of arguments in the parameter list
130or the pointer to the argv array with an additional parameter. 130or the pointer to the argv array with an additional parameter.
131This additional parameter is an array of pointers to null-terminated strings 131This additional parameter is an array of pointers to null-terminated strings
132and 132and
133.Em must 133.Em must
134be terminated by a 134be terminated by a
135.Dv NULL 135.Dv NULL
136pointer. 136pointer.
137The other functions take the environment for the new process image from the 137The other functions take the environment for the new process image from the
138external variable 138external variable
139.Va environ 139.Va environ
140in the current process. 140in the current process.
141.Pp 141.Pp
142Some of these functions have special semantics. 142Some of these functions have special semantics.
143.Pp 143.Pp
144The functions 144The functions
145.Fn execlp , 145.Fn execlp ,
146.Fn execlpe , 146.Fn execlpe ,
147.Fn execvp 147.Fn execvp ,
148and 148and
149.Fn execvpe 149.Fn execvpe
150will duplicate the actions of the shell in searching for an executable file 150will duplicate the actions of the shell in searching for an executable file
151if the specified file name does not contain a slash 151if the specified file name does not contain a slash
152.Dq Li \&/ 152.Dq Li \&/
153character. 153character.
154The search path is the path specified in the environment by the 154The search path is the path specified in the environment by the
155.Ev PATH 155.Ev PATH
156variable. 156variable.
157If this variable isn't specified, 157If this variable isn't specified,
158.Va _PATH_DEFPATH 158.Va _PATH_DEFPATH
159from 159from
160.In paths.h 160.In paths.h
@@ -234,27 +234,27 @@ Traditionally, the functions @@ -234,27 +234,27 @@ Traditionally, the functions
234and 234and
235.Fn execvpe 235.Fn execvpe
236ignored all errors except for the ones described above and 236ignored all errors except for the ones described above and
237.Er ENOMEM 237.Er ENOMEM
238and 238and
239.Er E2BIG , 239.Er E2BIG ,
240upon which they returned. 240upon which they returned.
241They now return if any error other than the ones described above occurs. 241They now return if any error other than the ones described above occurs.
242.Sh ERRORS 242.Sh ERRORS
243.Fn execl , 243.Fn execl ,
244.Fn execle , 244.Fn execle ,
245.Fn execlp , 245.Fn execlp ,
246.Fn execlpe , 246.Fn execlpe ,
247.Fn execvp 247.Fn execvp ,
248and 248and
249.Fn execvpe 249.Fn execvpe
250may fail and set 250may fail and set
251.Va errno 251.Va errno
252for any of the errors specified for the library functions 252for any of the errors specified for the library functions
253.Xr execve 2 253.Xr execve 2
254and 254and
255.Xr malloc 3 . 255.Xr malloc 3 .
256.Pp 256.Pp
257.Fn exect 257.Fn exect
258and 258and
259.Fn execv 259.Fn execv
260may fail and set 260may fail and set
@@ -262,26 +262,26 @@ may fail and set @@ -262,26 +262,26 @@ may fail and set
262for any of the errors specified for the library function 262for any of the errors specified for the library function
263.Xr execve 2 . 263.Xr execve 2 .
264.Sh SEE ALSO 264.Sh SEE ALSO
265.Xr sh 1 , 265.Xr sh 1 ,
266.Xr execve 2 , 266.Xr execve 2 ,
267.Xr fork 2 , 267.Xr fork 2 ,
268.Xr ptrace 2 , 268.Xr ptrace 2 ,
269.Xr environ 7 , 269.Xr environ 7 ,
270.Xr script 7 270.Xr script 7
271.Sh STANDARDS 271.Sh STANDARDS
272.Fn execl , 272.Fn execl ,
273.Fn execv , 273.Fn execv ,
274.Fn execle , 274.Fn execle ,
275.Fn execlp 275.Fn execlp ,
276and 276and
277.Fn execvp 277.Fn execvp
278conform to 278conform to
279.St -p1003.1-90 . 279.St -p1003.1-90 .
280.Pp 280.Pp
281The 281The
282.Fn execlpe 282.Fn execlpe
283function appeared first in QNX and the 283function appeared first in QNX and the
284.Fn execvpe 284.Fn execvpe
285is on both 285function exists on both
286.Lx 286.Lx
287and QNX. 287and QNX.