xref: /illumos-gate/usr/src/man/man3c/posix_spawnattr_getsigdefault.3c (revision e8d3efa1c56e5f2b5368600a2baeb7b1d54a07f8)
1.\"
2.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3.\" permission to reproduce portions of its copyrighted documentation.
4.\" Original documentation from The Open Group can be obtained online at
5.\" http://www.opengroup.org/bookstore/.
6.\"
7.\" The Institute of Electrical and Electronics Engineers and The Open
8.\" Group, have given us permission to reprint portions of their
9.\" documentation.
10.\"
11.\" In the following statement, the phrase ``this text'' refers to portions
12.\" of the system documentation.
13.\"
14.\" Portions of this text are reprinted and reproduced in electronic form
15.\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16.\" Standard for Information Technology -- Portable Operating System
17.\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18.\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19.\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20.\" between these versions and the original IEEE and The Open Group
21.\" Standard, the original IEEE and The Open Group Standard is the referee
22.\" document.  The original Standard can be obtained online at
23.\" http://www.opengroup.org/unix/online.html.
24.\"
25.\" This notice shall appear on any product containing this material.
26.\"
27.\" The contents of this file are subject to the terms of the
28.\" Common Development and Distribution License (the "License").
29.\" You may not use this file except in compliance with the License.
30.\"
31.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32.\" or http://www.opensolaris.org/os/licensing.
33.\" See the License for the specific language governing permissions
34.\" and limitations under the License.
35.\"
36.\" When distributing Covered Code, include this CDDL HEADER in each
37.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38.\" If applicable, add the following below this CDDL HEADER, with the
39.\" fields enclosed by brackets "[]" replaced with your own identifying
40.\" information: Portions Copyright [yyyy] [name of copyright owner]
41.\"
42.\"
43.\" Copyright (c) 2001, The IEEE and The Open Group.  All Rights Reserved.
44.\" Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
45.\" Copyright 2026 Oxide Computer Company
46.\"
47.Dd July 4, 2026
48.Dt POSIX_SPAWNATTR_GETSIGDEFAULT 3C
49.Os
50.Sh NAME
51.Nm posix_spawnattr_getsigdefault ,
52.Nm posix_spawnattr_setsigdefault
53.Nd get and set spawn-sigdefault attribute of spawn attributes object
54.Sh LIBRARY
55.Lb libc
56.Sh SYNOPSIS
57.In signal.h
58.In spawn.h
59.Ft int
60.Fo posix_spawnattr_getsigdefault
61.Fa "const posix_spawnattr_t *restrict attr"
62.Fa "sigset_t *restrict sigdefault"
63.Fc
64.Ft int
65.Fo posix_spawnattr_setsigdefault
66.Fa "posix_spawnattr_t *restrict attr"
67.Fa "const sigset_t *restrict sigdefault"
68.Fc
69.Sh DESCRIPTION
70The
71.Fn posix_spawnattr_getsigdefault
72function obtains the value of the spawn-sigdefault attribute from the
73attributes object referenced by
74.Fa attr .
75.Pp
76The
77.Fn posix_spawnattr_setsigdefault
78function sets the spawn-sigdefault attribute in an initialized attributes
79object referenced by
80.Fa attr .
81.Pp
82The spawn-sigdefault attribute represents the set of signals to be forced to
83default signal handling in the new process image
84.Po
85if
86.Dv POSIX_SPAWN_SETSIGDEF
87is set in the spawn-flags attribute
88.Pc
89by a spawn operation.
90The default value of this attribute is an empty signal set.
91.Sh RETURN VALUES
92Upon successful completion,
93.Fn posix_spawnattr_getsigdefault
94returns 0 and stores the value of the spawn-sigdefault attribute of
95.Fa attr
96into the object referenced by the
97.Fa sigdefault
98parameter.
99Otherwise, an error number is returned to indicate the error.
100.Pp
101Upon successful completion,
102.Fn posix_spawnattr_setsigdefault
103returns 0.
104Otherwise, an error number is returned to indicate the error.
105.Sh ERRORS
106These functions may fail if:
107.Bl -tag -width Er
108.It Er EINVAL
109The value specified by
110.Fa attr
111is invalid.
112.El
113.Pp
114The
115.Fn posix_spawnattr_setsigdefault
116function may fail if:
117.Bl -tag -width Er
118.It Er EINVAL
119The value of the attribute being set is not valid.
120.El
121.Sh INTERFACE STABILITY
122.Sy Standard
123.Sh MT-LEVEL
124.Sy MT-Safe
125.Sh SEE ALSO
126.Xr posix_spawn 3C ,
127.Xr posix_spawnattr_destroy 3C ,
128.Xr posix_spawnattr_getflags 3C ,
129.Xr posix_spawnattr_getpgroup 3C ,
130.Xr posix_spawnattr_getschedparam 3C ,
131.Xr posix_spawnattr_getschedpolicy 3C ,
132.Xr posix_spawnattr_getsigmask 3C ,
133.Xr attributes 7 ,
134.Xr standards 7
135.Sh STANDARDS
136The
137.Fn posix_spawnattr_getsigdefault
138and
139.Fn posix_spawnattr_setsigdefault
140functions conform to
141.St -p1003.1-2001 .
142