SIGADDSET(3P)
π SIGADDSET(3P) π
okay bestie, welcome to the POSIX Programmer's Manual β¨ this one's all about sigaddset(3P), and yes, it's giving "small function, big feelings" energy. let's get into it π«Ά
πΈ PROLOG πΈ
so like, real talk first: this page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so go check the corresponding Linux manual page for the deets on Linux behavior, iykyk), or honestly the interface might not even be implemented on Linux at all π. no cap, that's just how it is.
β¨ NAME β¨
sigaddset β add a signal to a signal set π
π¦ SYNOPSIS π¦
#include <signal.h>
int sigaddset(sigset_t *set, int signo);
π DESCRIPTION π
so the sigaddset() function adds the individual signal specified by the signo to the signal set pointed to by set. literally just, adding one signal into the set. slay. π
okay now here's the part where you gotta pay attention, bestie, because it's lowkey important:
Applications shall call eithersigemptyset()orsigfillset()at least once for each object of typesigset_tprior to any other use of that object. π¨
and if you don't initialize it that way but still hand it to any of pthread_sigmask(), sigaction(), sigaddset(), sigdelset(), sigismember(), sigpending(), sigprocmask(), sigsuspend(), sigtimedwait(), sigwait(), or sigwaitinfo()? the results are undefined. π not "probably fine", not "vibes-based", just undefined. init your sets, periodt. π
β RETURN VALUE β
- upon successful completion,
sigaddset()shall return0π - otherwise, it shall return
-1and seterrnoto indicate the error π
π₯ ERRORS π₯
the sigaddset() function may fail if:
EINVALβ The value of thesignoargument is an invalid or unsupported signal number. π«
The following sections are informative. (translation: cute bonus content, not the rules themselves π)
π EXAMPLES π
None. bestie really said "no examples, figure it out" π
π APPLICATION USAGE π
None. π¦
π RATIONALE π
None. π
πΈ FUTURE DIRECTIONS πΈ
None. β¨
π«Ά SEE ALSO π«Ά
- Section 2.4, Signal Concepts
pthread_sigmask()sigaction()sigdelset()sigemptyset()sigfillset()sigismember()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!! π this absolute icon of a manpage came to you from IEEE/The Open Group, dated 2017, filed under SIGADDSET(3P) π go init your signal sets and stay hydrated, mwah π β¨
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms