Lines Matching full:the
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" Portable Operating System Interface (POSIX), The Open Group Base
28 .\" Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of
29 .\" Electrical and Electronics Engineers, Inc and The Open Group. In the
30 .\" event of any discrepancy between this version and the original IEEE and
31 .\" The Open Group Standard, the original IEEE and The Open Group Standard is
32 .\" the referee document. The original Standard can be obtained online at
65 The
69 functions create a new process (child process) from the specified
71 The new process image is constructed from a regular executable
72 file called the new process image file.
74 When a C program is executed as the result of this call, it is
82 is the argument count and
84 is an array of character pointers to the arguments themselves.
85 In addition, the variable:
91 the environment strings.
93 The argument
97 The last member of this array is a null pointer and is not counted
100 These strings constitute the argument list available to the new process
102 The value in
105 a filename that is associated with the process image being started by
106 the
112 The argument
115 These strings constitute the environment for the new process image.
116 The environment array is terminated by a null pointer.
118 The
122 is a pathname that identifies the new process image file to execute.
124 The
128 is used to construct a pathname that identifies the new process
130 If the file parameter contains a slash character, the file parameter
131 is used as the pathname for the new process image file.
132 Otherwise, the path prefix for this file is obtained by a search
133 of the directories passed as the environment variable
136 the default path is set according to the
145 is a null pointer, then file descriptors open in the
146 calling process remain open in the child process, except for those
152 file descriptors that remain open, all attributes of the corresponding
159 is not NULL, then the file descriptors open in the child process are
160 those open in the calling process as modified by the spawn file
163 and the
165 flag of each remaining open file descriptor after the spawn file actions
167 The effective order of processing the spawn file actions are:
170 The set of open file descriptors for the child process initially
171 are the same set as is open for the calling process.
172 All attributes of the corresponding open file descriptions, including
177 The signal mask, signal default actions, and the effective user and
178 group IDs for the child process are changed as specified in the
182 The file actions specified by the spawn file actions object are
183 performed in the order in which they were added to the spawn file
193 The
197 It contains the attributes defined below.
199 If the
201 flag is set in the spawn-flags attribute of the object referenced by
203 and the spawn-pgroup attribute of the same object is non-zero, then the
204 child's process group is as specified in the spawn-pgroup
205 attribute of the object referenced by
208 As a special case, if the
210 flag is set in the spawn-flags attribute of the object referenced by
212 and the spawn-pgroup attribute of the same object is set to zero, then
213 the child is in a new process group with a process group ID equal
216 If the
218 flag is not set in the spawn-flags attribute of the object referenced by
220 the new child process inherits the parent's process group.
222 If the
224 flag is set in the spawn-flags attribute of the object referenced by
228 is not set, the new process image initially has the scheduling
229 policy of the calling process with the scheduling parameters specified
230 in the spawn-schedparam attribute of the object referenced by
233 If the
235 flag is set in the spawn-flags attribute of the object referenced by
237 (regardless of the setting of the
239 flag), the new process image initially has the scheduling policy
240 specified in the spawn-schedpolicy attribute of the object referenced by
242 and the scheduling parameters specified in the spawn-schedparam
243 attribute of the same object.
245 The
247 flag in the spawn-flags attribute of the object referenced by
249 governs the effective user ID of the child process.
250 If this flag is not set, the child process inherits the parent
252 If this flag is set, the child process' effective user ID is reset
253 to the parent's real user ID.
254 In either case, if the set-user-ID mode bit of the new process image
255 file is set, the effective user ID of the child process becomes
256 that file's owner ID before the new process image begins execution.
258 The
260 flag in the spawn-flags attribute of the object referenced by
262 also governs the effective group ID of the child process.
263 If this flag is not set, the child process inherits the parent
265 If this flag is set, the child process' effective group ID is
266 reset to the parent's real group ID.
267 In either case, if the set-group-ID mode bit of the new process image
268 file is set, the effective group ID of the child process becomes
269 that file's group ID before the new process image begins execution.
271 If the
273 flag is set in the spawn-flags attribute of the object referenced by
275 the child process initially has the signal mask specified in the
276 spawn-sigmask attribute of the object referenced by
279 If the
281 flag is set in the spawn-flags attribute of the object referenced by
283 the signals specified in the spawn-sigdefault attribute of the same
284 object are set to their default actions in the child process.
285 Signals set to the default action in the parent process are set to
286 the default action in the child process.
288 Signals set to be caught by the calling process are set to the
289 default action in the child process.
291 Signals set to be ignored by the calling process image are set to
292 be ignored by the child process, unless otherwise specified by the
294 flag being set in the spawn-flags attribute of the object referenced by
296 and the signals being indicated in the spawn-sigdefault attribute
297 of the object referenced by
300 The Address Space Layout Randomization for the newly spawned process
301 can be disabled by specifying the
303 flag in the spawn-flags attribute.
304 This setting is inherited by future children of the child as well.
309 If the value of the
311 pointer is NULL, then the default values are used.
313 All process attributes, other than those influenced by the attributes
314 set in the object referenced by
316 as specified above or by the file descriptor manipulations specified in
318 appear in the new process image as though
322 had been called by the child process to execute the new process image.
324 The implementation uses
326 thus the fork handlers are not run when
336 return the process ID of the child process to the parent process,
337 in the variable pointed to by a non-NULL
339 argument, and return zero as the function return value.
341 the variable pointed to by
343 and an error number is returned as the function return value to
344 indicate the error.
345 If the
347 argument is a null pointer, the process ID of the child is not returned
348 to the caller.
356 fail for any of the reasons that would cause
358 or one of the
364 respectively (or, if the error occurs after the calling process successfully
365 returns, the child process exits with exit status 127).
369 is set in the spawn-flags attribute of the object referenced by attrp, and
373 fails while changing the child's process group, an error value is returned as
376 (or, if the error occurs after the calling process successfully returns,
377 the child process exits with exit status 127).
383 is not set in the spawn-flags attribute of the object referenced by attrp, then
388 fails for any of the reasons that would cause
392 (or, if the error occurs after the calling process successfully returns, the
397 is set in the spawn-flags attribute of the object referenced by attrp, and if
401 fails for any of the reasons that would cause
405 (or, if the error occurs after the calling process successfully returns,
406 the child process exits with exit status 127).
408 If the
415 fails for any of the reasons that would cause
423 respectively (or, if the error occurs after the calling process successfully
424 returns, the child process exits with exit status 127). An open file action
425 may, by itself, result in any of the errors described by
432 The ignore extends to any errors from individual file descriptors
434 executed as part of the
472 The
480 A future update of the Standard is expected to require that these functions
485 The