OpenBSD manual page server

Manual Page Search Parameters

POSIX_SPAWNATTR_GETFLAGS(3) Library Functions Manual POSIX_SPAWNATTR_GETFLAGS(3)

posix_spawnattr_getflags, posix_spawnattr_setflagsget or set flags of a posix_spawn attributes object

#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);

The () and () 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:

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.

Set the process group of the child process according to the pgroup attribute of the object; see posix_spawnattr_getpgroup(3) and setpgid(2).
Reset signals set by posix_spawnattr_setsigdefault(3) to their default value in the child process.
Set the signal mask of the child process according to the value set by posix_spawnattr_setsigmask(3), using sigprocmask(2).
Set the scheduling parameter of the child process according to the value set by posix_spawnattr_setschedparam(3) (mandated by IEEE Std 1003.1-2001 (“POSIX.1”), this implementation currently does nothing).
Set the scheduler policy of the child process according to the value set by posix_spawnattr_setschedpolicy(3) (mandated by IEEE Std 1003.1-2001 (“POSIX.1”), this implementation currently does nothing).

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

Both functions return 0.

posix_spawn(3), posix_spawnattr_init(3)

Both functions conform to IEEE Std 1003.1-2001 (“POSIX.1”).

Ed Schouten <ed@FreeBSD.org>

February 22, 2023 OpenBSD-current