.\" $OpenBSD: posix_spawnattr_getflags.3,v 1.6 2012/04/11 14:44:35 espie Exp $ .\" .\" Copyright (c) 2012 Marc Espie .\" .\" 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