---
name: "sigsetmask"
section: "2"
platform: "macos"
package: "Libc"
version: "1752.120.2"
release: "macOS 26.5"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/sigsetmask"
---

# sigsetmask(2)

set current signal mask

## NAME

**sigsetmask** – set current signal mask

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

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

*int*\

**sigsetmask**(*int mask*);

**sigmask**(*signum*);

## DESCRIPTION

This interface is made obsolete by: [sigprocmask(2)](/sigprocmask/2.md).

**Sigsetmask**() sets the current signal mask.  Signals are blocked from delivery if the corresponding bit in *mask* is a 1; the macro **sigmask**() is provided to construct the mask for a given *signum*.

The system quietly disallows SIGKILL or SIGSTOP to be blocked.

## RETURN VALUES

The previous set of masked signals is returned.

## SEE ALSO

[kill(2)](/kill/2.md), [sigaction(2)](/sigaction/2.md), [sigblock(2)](/sigblock/2.md), [sigprocmask(2)](/sigprocmask/2.md), [sigsuspend(2)](/sigsuspend/2.md), [sigvec(2)](/sigvec/2.md), [sigsetops(3)](/sigsetops/3.md)

## HISTORY

The **sigsetmask**() function call appeared in 4.2BSD and has been deprecated.
