---
name: "posix_spawnattr_getsigmask"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/posix_spawnattr_getsigmask"
---

# posix\_spawnattr\_getsigmask(3)

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

## NAME

**posix\_spawnattr\_getsigmask**, **posix\_spawnattr\_setsigmask** – get and set the spawn-sigmask attribute of a spawn attributes object

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<spawn.h\>**

*int*\

**posix\_spawnattr\_getsigmask**(*const posix\_spawnattr\_t \*restrict attr*, *sigset\_t \*restrict sigmask*);

*int*\

**posix\_spawnattr\_setsigmask**(*posix\_spawnattr\_t \*attr*, *const sigset\_t \*restrict sigmask*);

## DESCRIPTION

The **posix\_spawnattr\_getsigmask**() function obtains the value of the spawn-sigmask attribute from the attributes object referenced by *attr*.

The **posix\_spawnattr\_setsigmask**() function 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

The **posix\_spawnattr\_getsigmask**() and **posix\_spawnattr\_setsigmask**() functions return zero.

## SEE ALSO

[posix\_spawn(3)](/posix_spawn/3.md), [posix\_spawnattr\_destroy(3)](/posix_spawnattr_destroy/3.md), [posix\_spawnattr\_getsigmask(3)](/posix_spawnattr_getsigmask/3.md), [posix\_spawnattr\_init(3)](/posix_spawnattr_init/3.md), [posix\_spawnattr\_setsigmask(3)](/posix_spawnattr_setsigmask/3.md), [posix\_spawnp(3)](/posix_spawnp/3.md)

## STANDARDS

The **posix\_spawnattr\_getsigmask**() and **posix\_spawnattr\_setsigmask**() functions conform to IEEE Std 1003.1-2001 (“POSIX.1”).

## HISTORY

The **posix\_spawnattr\_getsigmask**() and **posix\_spawnattr\_setsigmask**() functions first appeared in FreeBSD 8.0.

## AUTHORS

Ed Schouten ⟨*ed@FreeBSD.org*⟩
