1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
.\" $OpenBSD: posix_spawnattr_getflags.3,v 1.6 2012/04/11 14:44:35 espie Exp $
.\"
.\" Copyright (c) 2012 Marc Espie <espie@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: April 11 2012 $
.Dt POSIX_SPAWNATTR_GETFLAGS 3
.Os
.Sh NAME
.Nm posix_spawnattr_getflags ,
.Nm posix_spawnattr_setflags
.Nd "get and set flags of a posix_spawn attributes object"
.Sh SYNOPSIS
.In spawn.h
.Ft int
.Fn posix_spawnattr_getflags "const posix_spawnattr_t *restrict attr" "short *restrict flags"
.Ft int
.Fn posix_spawnattr_setflags "posix_spawnattr_t *attr" "short flags"
.Sh DESCRIPTION
The
.Fn posix_spawnattr_getflags
and
.Fn posix_spawnattr_setflags
functions are used to get or set the flags part of a
.Xr posix_spawn 3
attribute object referenced by
.Fa attr .
.Pp
Flag values are OR-ed from the following flags:
.Bl -tag -width POSIX_SPAWN
.It Dv POSIX_SPAWN_RESETIDS
Reset the effective user and group ID of the child process to the parent's
real user and group ID;
see
.Xr setegid 2 .
.Pp
If the new process is created from a set-user-ID or set-group-ID file, usual
.Xr execve 2
semantics take precedence.
.It Dv POSIX_SPAWN_SETPGROUP
Set the process group of the child process according to the pgroup attribute
of the object; see
.Xr posix_spawnattr_getpgroup 3
and
.Xr setpgid 2 .
.It Dv POSIX_SPAWN_SETSIGDEF
Reset signals set by
.Xr posix_spawnattr_setsigdefault 3
to their default value in the child process.
.It Dv POSIX_SPAWN_SETSIGMASK
Set the signal mask of the child process according
to the value set by
.Xr posix_spawnattr_setsigmask 3 ,
using
.Xr sigprocmask 2 .
.It Dv POSIX_SPAWN_SETSCHEDPARAM
Set the scheduling parameter of the child process
according to the value set by
.Xr posix_spawnattr_setschedparam 3
.Po
mandated by
.St -p1003.1-2001 ,
this implementation currently does nothing
.Pc .
.It Dv POSIX_SPAWN_SETSCHEDULER
Set the scheduler policy of the child process
according to the value set by
.Xr posix_spawnattr_setschedpolicy 3
.Po
mandated by
.St -p1003.1-2001 ,
this implementation currently does nothing
.Pc .
.El
.Pp
.Xr posix_spawnattr_init 3
initializes this value to no flags set.
.Sh RETURN VALUES
Both functions return 0.
.Sh SEE ALSO
.Xr posix_spawn 3 ,
.Xr posix_spawnattr_init 3
.Sh STANDARDS
Both functions conform to
.St -p1003.1-2001 .
.Sh AUTHORS
.An Ed Schouten Aq ed@FreeBSD.org
|