posix_spawnattr_getsigmask or posix_spawnattr_setsigmask Subroutine
Purpose
Gets and sets the spawn-sigmask attribute of a spawn attributes object.
Syntax
#include <signal.h>
#include <spawn.h>
int posix_spawnattr_getsigmask(const posix_spawnattr_t *restrict attr,
sigset_t *restrict sigmask);
int posix_spawnattr_setsigmask(posix_spawnattr_t *restrict attr,
const sigset_t *restrict sigmask);
Description
The posix_spawnattr_getsigmask subroutine gets the value of the spawn-sigmask attribute from the attributes object referenced by attr.
The posix_spawnattr_setsigmask subroutine sets the spawn-sigmask attribute in an initialized attributes object referenced by attr.
The spawn-sigmask attribute represents the signal mask in effect in the new process image of a spawn operation (if POSIX_SPAWN_SETSIGMASK is set in the spawn-flags attribute). The default value of this attribute is unspecified.
Return Values
Upon
successful completion, the posix_spawnattr_getsigmask subroutine
returns 0
and stores the value of the spawn-sigmask attribute
of attr into the object referenced by the sigmask parameter;
otherwise, an error number is returned to indicate the error.
Upon
successful completion, the posix_spawnattr_setsigmask subroutine
returns 0
; otherwise, an error number is returned
to indicate the error.
Error Codes
Item | Description |
---|---|
EINVAL | The value specified by attr is invalid. |
Item | Description |
---|---|
EINVAL | The value of the attribute being set is not valid. |