]>
Commit | Line | Data |
---|---|---|
2d21ac55 A |
1 | .\" |
2 | .\" Copyright (c) 2000-2007 Apple Inc. All rights reserved. | |
3 | .\" | |
4 | .\" @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | |
5 | .\" | |
6 | .\" This file contains Original Code and/or Modifications of Original Code | |
7 | .\" as defined in and that are subject to the Apple Public Source License | |
8 | .\" Version 2.0 (the 'License'). You may not use this file except in | |
9 | .\" compliance with the License. The rights granted to you under the License | |
10 | .\" may not be used to create, or enable the creation or redistribution of, | |
11 | .\" unlawful or unlicensed copies of an Apple operating system, or to | |
12 | .\" circumvent, violate, or enable the circumvention or violation of, any | |
13 | .\" terms of an Apple operating system software license agreement. | |
14 | .\" | |
15 | .\" Please obtain a copy of the License at | |
16 | .\" http://www.opensource.apple.com/apsl/ and read it before using this file. | |
17 | .\" | |
18 | .\" The Original Code and all software distributed under the License are | |
19 | .\" distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
20 | .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
21 | .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
22 | .\" FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
23 | .\" Please see the License for the specific language governing rights and | |
24 | .\" limitations under the License. | |
25 | .\" | |
26 | .\" @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | |
27 | .\" | |
28 | .\" @(#)posix_spawnattr_init.3 | |
29 | . | |
30 | .Dd August 22, 2007 | |
31 | .Dt POSIX_SPAWNATTR_INIT 3 | |
32 | .Os "Mac OS X" | |
33 | .Sh NAME | |
34 | .Nm posix_spawnattr_init | |
35 | .Nm posix_spawnattr_destroy | |
36 | .Nd initialize or destroy a spawn attributes object | |
37 | .Sh SYNOPSIS | |
38 | .Fd #include <spawn.h> | |
39 | .Ft int | |
40 | .Fo posix_spawnattr_init | |
41 | .Fa "posix_spawnattr_t *attr" | |
42 | .Fc | |
43 | .Ft int | |
44 | .Fo posix_spawnattr_destroy | |
45 | .Fa "posix_spawnattr_t *attr" | |
46 | .Fc | |
47 | .Sh DESCRIPTION | |
48 | The | |
49 | .Fn posix_spawnattr_init | |
50 | function initializes the object referenced by | |
51 | .Em attr , | |
52 | to an empty set of spawn attributes for subsequent use in a call to | |
53 | .Xr posix_spawn 2 | |
54 | or | |
55 | .Xr posix_spawnp 2 . | |
56 | .Pp | |
57 | A | |
58 | .Em posix_spawnattr_t | |
59 | object is an opaque type that is used to collect set of spawn attributes | |
60 | specified by calls to | |
61 | .Xr posix_spawnattr_setflags 3 , | |
62 | .Xr posix_spawnattr_setpgroup 3 , | |
63 | .Xr posix_spawnattr_setsigdefault 3 , | |
64 | .Xr posix_spawnattr_setsigmask 3 , | |
f427ee49 | 65 | .Xr posix_spawnattr_setarchpref_np 3 , |
2d21ac55 A |
66 | .Xr posix_spawnattr_setbinpref_np 3 , |
67 | .Xr posix_spawnattr_setspecialport_np 3 , | |
68 | or | |
69 | .Xr posix_spawnattr_setexceptionports_np 3 | |
70 | such that once the spawn operation is complete, the child process will | |
71 | have a different set of attributes than the parent. The order of these | |
72 | operations is unspecified and may change; programs should not depend on | |
73 | their ordering. | |
74 | .Pp | |
75 | The | |
76 | .Fn posix_spawnattr_destroy | |
77 | function destroys the object referenced by | |
78 | .Em attr | |
79 | which was previously intialized by | |
80 | .Fn posix_spawnattr_init , | |
81 | returning any resources obtained at the time of initialization to the | |
82 | system for subsequent reuse. A | |
83 | .Em posix_spawnattr_t | |
84 | may be reinitialized after having been destroyed, but | |
85 | .Em must not | |
86 | be reused after destruction, unless it has been reinitialized. | |
87 | .Sh RETURN VALUES | |
88 | On success, these functions return 0; on failure they return an error | |
89 | number from | |
90 | .In errno.h . | |
91 | .Sh ERRORS | |
92 | The | |
93 | .Fn posix_spawnattr_init | |
94 | and | |
95 | .Fn posix_spawnattr_destroy | |
96 | functions will fail and return an error if: | |
97 | .Bl -tag -width Er | |
98 | .\" ========== | |
99 | .It Bq Er ENOMEM | |
100 | Insufficient resources to initialize the | |
101 | .Fa posix_spawnattr_t | |
102 | object. | |
103 | .\" ========== | |
104 | .It Bq Er EINVAL | |
105 | The | |
106 | .Fa posix_spawnattr_t | |
107 | being destroyed is invalid. | |
108 | .El | |
109 | .Sh SEE ALSO | |
110 | .Xr posix_spawn 2 , | |
111 | .Xr posix_spawnp 2 , | |
112 | .Xr posix_spawnattr_setflags 3 , | |
113 | .Xr posix_spawnattr_setpgroup 3 , | |
114 | .Xr posix_spawnattr_setsigdefault 3 , | |
115 | .Xr posix_spawnattr_setsigmask 3 , | |
116 | .Xr posix_spawnattr_setbinpref_np 3 , | |
117 | .Xr posix_spawnattr_setspecialport_np 3 , | |
118 | .Xr posix_spawnattr_setexceptionports_np 3 | |
119 | .Sh STANDARDS | |
120 | .St -susv3 [SPN] | |
121 | .Sh HISTORY | |
122 | The | |
123 | .Fn posix_spawn | |
124 | and | |
125 | .Fn posix_spawnp | |
126 | function calls appeared in | |
127 | .St -susv3 [SPN] . |