SIGSETMASK(2)
πΈ NAME πΈ
sigsetmask, sigblock β manipulate current signal mask. Bestie, this is the SIGSETMASK(2) page from the System Calls Manual, and weβre gonna get into the vintage signal-mask vibes π
β¨
π LIBRARY π
Standard C Library (libc, -lc) β yes, thatβs the one π«Ά
β¨ SYNOPSIS β¨
#include <signal.h>
int
sigsetmask(int mask);
int
sigblock(int mask);
int
sigmask(int signum);
π DESCRIPTION π
Okay so first things first: this interface is made obsolete by sigprocmask(2). Itβs giving βvintage icon, but we have newer tech nowβ π
The sigsetmask() function sets the current signal mask to the specified mask. Signals are blocked from delivery if the corresponding bit in mask is a 1.
The sigblock() function adds the signals in the specified mask to the current signal mask, rather than overwriting it like sigsetmask() does. The way that sigblock() is additive and sigsetmask() is a full replacement? Thatβs the whole distinction, iykyk π₯
The macro sigmask() is provided to construct the mask for a given signum.
The system quietly disallowsSIGKILLorSIGSTOPto be blocked. No cap, it just will not let those two get masked π
π RETURN VALUES π
The sigblock() and sigsetmask() functions return the previous set of masked signals. So you get the old vibe check back in return π«
π SEE ALSO π
π HISTORY π
The sigsetmask() and sigblock() functions first appeared in 4.2BSD and have been deprecated. Iconic behavior, honestly, but deprecated is deprecated π
mwah π β this page is from Debian, dated June 2, 1993, and itβs the SIGSETMASK(2) manual page. periodt π¦
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 1983, 1991, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms