SIGPENDING(2)

✨ NAME ✨

omg bestie, you found the sigpending(2) page β€” yes, the System Calls Manual one. It's all about getting those pending signals. πŸ’–

sigpending β€” get pending signals, periodt.


πŸ“š LIBRARY πŸ“š

It lives in the Standard C Library (libc, -lc), no cap. πŸŽ€


πŸ“œ SYNOPSIS πŸ“œ

#include <signal.h>

int
sigpending(sigset_t *set);

πŸ’– DESCRIPTION πŸ’–

Okay so sigpending() is the system call that returns a mask of the signals pending for delivery to the calling thread or the calling process in the location indicated by set. It literally puts that mask where set points. ✨

Why are signals pending? Maybe because they are currently masked, or just transiently before delivery β€” although that latter case is not normally detectable, so it's giving sneaky. πŸ‘€


πŸ” RETURN VALUES πŸ”

The sigpending() function returns the value 0 if successful. Otherwise, the value -1 is returned and the global variable errno is set to indicate the error. So yeah: 0 = slay, -1 = check errno, bestie. πŸ’…


πŸ’€ ERRORS πŸ’€

The sigpending() system call will fail if:

  • [EFAULT] β€” the set argument specified an invalid address.

πŸ‘€ SEE ALSO πŸ‘€


🌈 STANDARDS 🌈

The sigpending() system call is expected to conform to ISO/IEC 9945-1:1990 (β€œPOSIX.1”). Iconic behavior, honestly. ⭐


This page is from Debian, dated September 6, 2013 β€” SIGPENDING(2), and that's the whole vibe. Byeee πŸ’…πŸ«Ά

πŸ“¦ where this page comes from