POSIX_SPAWNATTR_GETFLAGS(3)

NAME
posix_spawnattr_getflags, posix_spawnattr_setflags - get and set flags of a posix_spawn attributes object

SYNOPSIS
#include <spawn.h>
int
posix_spawnattr_getflags(const posix_spawnattr_t *restrict attr, short *restrict flags);
int
posix_spawnattr_setflags(posix_spawnattr_t *attr, short flags);

DESCRIPTION
The posix_spawnattr_getflags() and posix_spawnattr_setflags() functions are used to get or set the flags part of a posix_spawn(3) attribute object referenced by attr.

Flag values are OR-ed from the following flags:

POSIX_SPAWN_RESETIDS
    Reset the effective user and group ID of the child process to the parent's real user and group ID; see setegid(2).

    If the new process is created from a set-user-ID or set-group-ID file, usual execve(2) semantics take precedence.

POSIX_SPAWN_SETPGROUP
    Set the process group of the child process according to the pgroup attribute of the object; see posix_spawnattr_getpgroup(3) and setpgid(2).

POSIX_SPAWN_SETSIGDEF
    Reset signals set by posix_spawnattr_setsigdefault(3) to their default value in the child process.

POSIX_SPAWN_SETSIGMASK
    Set the signal mask of the child process according to the value set by posix_spawnattr_setsigmask(3), using sigprocmask(2).

POSIX_SPAWN_SETSCHEDPARAM
    Set the scheduling parameter of the child process according to the value set by posix_spawnattr_setschedparam(3) ( mandated by p1003.1-2001, this implementation currently does nothing).

POSIX_SPAWN_SETSCHEDULER
    Set the scheduler policy of the child process according to the value set by posix_spawnattr_setschedpolicy(3) ( mandated by p1003.1-2001, this implementation currently does nothing).

posix_spawnattr_init(3) initializes this value to no flags set.

RETURN VALUES
Both functions return 0.

SEE ALSO
posix_spawn(3), posix_spawnattr_init(3)

STANDARDS
Both functions conform to p1003.1-2001.

AUTHORS
Ed Schouten <ed@FreeBSD.org>