posix_spawnattr_getsigdefault or posix_spawnattr_setsigdefault Subroutine

Purpose

Gets and sets the spawn-sigdefault attribute of a spawn attributes object.

Syntax

#include <signal.h>
#include <spawn.h>

int posix_spawnattr_getsigdefault(const posix_spawnattr_t *
       restrict attr, sigset_t *restrict sigdefault);
int posix_spawnattr_setsigdefault(posix_spawnattr_t *restrict attr,
       const sigset_t *restrict sigdefault);

Description

The posix_spawnattr_getsigdefault subroutine gets the value of the spawn-sigdefault attribute from the attributes object referenced by attr.

The posix_spawnattr_setsigdefault subroutine sets the spawn-pgroup attribute in an initialized attributes object referenced by attr.

The spawn-sigdefault attribute represents the set of signals to be forced to default signal handling in the new process image by a spawn operation (if POSIX_SPAWN_SETSIGDEF is set in the spawn-flags attribute). The default value of this attribute is an empty signal set.

Return Values

Upon successful completion, the posix_spawnattr_getsigdefault subroutine returns 0 and stores the value of the spawn-sigdefault attribute of attr into the object referenced by the sigdefault parameter; otherwise, an error number is returned to indicate the error.

Upon successful completion, the posix_spawnattr_setsigdefault subroutine returns 0; otherwise, an error number is returned to indicate the error.

Error Codes

The posix_spawnattr_getsigdefault and posix_spawnattr_setsigdefault subroutines might fail if the following is true:
Item Description
EINVAL The value specified by attr is invalid.
The posix_spawnattr_setsigdefault subroutine might fail if the following is true:
Item Description
EINVAL The value of the attribute being set is not valid.