posix_spawnattr_getflags(), posix_spawnattr_setflags()

get and set the spawn-flags attribute of a spawn attributes object 

Advanced Realtime Function


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() function retrieves the value of the spawn-flags attribute from the attr attributes object. The flags argument points to the location where this value is to be returned.

The posix_spawnattr_setflags() function sets the value of the spawn-flags attribute in an initialized attributes object pointed to by attr. The flags argument points to the value for spawn-flags to be set to.

In a spawn attributes object, the spawn-flags attribute indicates which process attributes are to be changed in a new process image spawned by posix_spawn() or posix_spawnp(). The value of the spawn-flags is the the bitwise-inclusive OR of zero or more of the following flags:

POSIX_SPAWN_RESETIDS
POSIX_SPAWN_SETPGROUP
POSIX_SPAWN_SETSIGDEF
POSIX_SPAWN_SETSIGMASK
POSIX_SPAWN_SETSCHEDPARAM
POSIX_SPAWN_SETSCHEDULER

By default, the spawn-flags attribute has a value as if none of these flags (defined in the <spawn.h> header) were set.


PARAMETERS

attr 

Points to a spawn attributes object.

flags 

Points to the value retrieved by posix_spawnattr_getflags() or to the value to be assigned to the spawn-flags attribute by posix_spawnattr_setflags().


RETURN VALUES

On success, posix_spawnattr_getflags() and posix_spawnattr_setflags() return 0. Additionally, posix_spawnattr_getflags() places the value retrieved from the spawn-flags attribute of the attr spawn attributes object in the object pointed to by flags.

Otherwise, one of the following error numbers is returned:

EINVAL 

The attr or flags arguments point to an invalid value.


CONFORMANCE

UNIX 03.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
posix_spawn(), posix_spawnattr_destroy(), posix_spawnattr_getpgroup(), posix_spawnattr_getschedparam(), posix_spawnattr_getschedpolicy(), posix_spawnattr_getsigdefault(), posix_spawnattr_getsigmask(), posix_spawnattr_init(), posix_spawnattr_setpgroup(), posix_spawnattr_setschedparam(), posix_spawnattr_setschedpolicy(), posix_spawnattr_setsigdefault(), posix_spawnattr_setsigmask(), posix_spawnp()

Miscellaneous:
spawn


PTC MKS Toolkit 10.4 Documentation Build 39.