]> git.saurik.com Git - apple/xnu.git/blob - bsd/man/man3/posix_spawnattr_setsigmask.3
xnu-6153.141.1.tar.gz
[apple/xnu.git] / bsd / man / man3 / posix_spawnattr_setsigmask.3
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_setsigmask.3
29 .
30 .Dd August 22, 2007
31 .Dt POSIX_SPAWNATTR_SETSIGMASK 3
32 .Os "Mac OS X"
33 .Sh NAME
34 .Nm posix_spawnattr_setsigmask
35 .Nm posix_spawnattr_getsigmask
36 .Nd set or get the
37 .Em spawn-sigmask
38 attribute on a
39 .Em posix_spawnattr_t
40 .Sh SYNOPSIS
41 .Fd #include <spawn.h>
42 .Ft int
43 .Fo posix_spawnattr_setsigmask
44 .Fa "posix_spawnattr_t *restrict attr"
45 .Fa "const sigset_t *restrict sigmask"
46 .Fc
47 .Ft int
48 .Fo posix_spawnattr_getsigmask
49 .Fa "const posix_spawnattr_t *restrict attr"
50 .Fa "sigset_t *restrict sigmask"
51 .Fc
52 .Sh DESCRIPTION
53 The
54 .Fn posix_spawnattr_setsigmask
55 function sets the
56 .Fa sigmask
57 on the attributes object referenced by
58 .Fa attr .
59 .Pp
60 The
61 .Fn posix_spawnattr_getsigmask
62 function retrieves the
63 .Fa sigmask
64 on the attributes object referenced by
65 .Fa attr .
66 .Pp
67 The argument
68 .Fa sigmask
69 is the initial signal mask to be set for the new process on creation if the
70 .Em POSIX_SPAWN_SETSIGMASK
71 flag is set in the
72 .Em posix_spawnattr_t .
73 It's default value must be set via a call to
74 .Xr posix_spawnattr_setflags 3
75 or the behaviour is undefined.
76 .Sh RETURN VALUES
77 On success, these functions return 0; on failure they return an error
78 number from
79 .In errno.h .
80 Additionally, if successful,
81 .Fn posix_spawnattr_getsigmask
82 will modify the contents of the
83 .Fa sigmask
84 parameter with the current attribute value.
85 .Sh ERRORS
86 These functions may fail if:
87 .Bl -tag -width Er
88 .\" ==========
89 .It Bq Er EINVAL
90 The value specified by
91 .Fa attr
92 is invalid.
93 .\" ==========
94 .It Bq Er EINVAL
95 The value of
96 .Fa attr
97 is invalid.
98 .El
99 .Sh SEE ALSO
100 .Xr posix_spawn 2 ,
101 .Xr posix_spawnp 2 ,
102 .Xr posix_spawnattr_init 3 ,
103 .Xr posix_spawnattr_destroy 3 ,
104 .Xr posix_spawnattr_setflags 3
105 .Sh STANDARDS
106 .St -susv3 [SPN]
107 .Sh HISTORY
108 The
109 .Fn posix_spawnattr_setsigmask
110 and
111 .Fn posix_spawnattr_getsigmask
112 function calls appeared in
113 .St -susv3 [SPN] .