SIGISMEMBER(3POSIX)
π SIGISMEMBER(3POSIX) π
okay so this is a page from the POSIX Programmer's Manual bestie, and before we get into it, real talk:
β οΈ The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
so like, it's giving "your mileage may vary, check ur local manpage" energy. noted. π
β¨ NAME β¨
sigismember β test for a signal in a signal set π
π¦ SYNOPSIS π¦
#include <signal.h>
int sigismember(const sigset_t *set, int signo);
πΈ DESCRIPTION πΈ
So the whole vibe of sigismember() is: it shall test whether the signal specified by signo is a member of the set pointed to by set. that's it. that's the function. is this signal in this little club or not. membership check. iconic. π
BUT β and this is the part people skip and then their code explodes β applications should call either sigemptyset() or sigfillset() at least once for each object of type sigset_t prior to any other use of that object.
like, initialize ur set first, bestie. don't be weird about it.
And if you don't initialize it that way, but you still hand it over as an argument to any of these:
pthread_sigmask()sigaction()sigaddset()sigdelset()sigismember()sigpending()sigprocmask()sigsuspend()sigtimedwait()sigwait()sigwaitinfo()
β¦then the results are undefined. π undefined behaviour. not "maybe it works", not "works on my machine", just undefined. so don't. please. for me. π
π RETURN VALUE π
Upon successful completion, sigismember() shall return:
1β if the specified signal is a member of the specified set β¨0β if it is not π«Ά
Otherwise, it shall return -1 and set errno to indicate the error. π
π ERRORS π
The sigismember() function may fail if:
EINVALβ the signo argument is not a valid signal number, or is an unsupported signal number. π«
π the following sections are informative β meaning: cute to know, not rules. slay. π
π EXAMPLES π
None. (yes literally none, the page just says None. we love a low-effort queen.) π
π§ APPLICATION USAGE π§
None. β¨
β RATIONALE β
None. π
πΈ FUTURE DIRECTIONS πΈ
None. π¦
π SEE ALSO π
- Section 2.4, Signal Concepts
pthread_sigmask()sigaction()sigaddset()sigdelset()sigfillset()sigemptyset()sigpending()sigsuspend()
and from the Base Definitions volume of POSIX.1β2017, <signal.h> π
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.
In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page bestie π IEEE/The Open Group, 2017, SIGISMEMBER(3POSIX) β mwah, go initialize ur sigsets, ily, bye πβ¨
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms