[issue33329] sigaddset() can fail on some signal numbers

Adhemerval Zanella report at bugs.python.org
Sun Apr 22 14:26:41 EDT 2018


Adhemerval Zanella <zatrazz at gmail.com> added the comment:

One option would be to create a list of possible defined signals and check if the signal is on the list.  For realtime signals, it just a matter to check if SIGRTMIN <= signal <= SIGRTMAX.

The glibc defined signals can be checked at tst-signal.c [1] or from main signal(7).  It should cover usual ISO C, POSIX, and some linux arch-specific signals, but you will still need to check if other OS defined extra signals uses elsewhere (another option would to add this check only for Linux/glibc).

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=signal/tst-sigset.c;h=a2b764de5ad66ee960c94ec18df75a07fce4b9a6;hb=HEAD

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33329>
_______________________________________


More information about the Python-bugs-list mailing list