sigset(3) Library Functions Manual sigset(3) sigset, sighold, sigrelse, sigignore - System V LIBRARY Standard C library (libc, -lc) #include typedef void (*sighandler_t)(int); [[deprecated]] sighandler_t sigset(int sig, sighandler_t disp); [[deprecated]] int sighold(int sig); [[deprecated]] int sigrelse(int sig); [[deprecated]] int sigignore(int sig); glibc (. feature_test_macros(7)): sigset(), sighold(), sigrelse(), sigignore(): _XOPEN_SOURCE >= 500 glibc , System V. : POSIX (sigaction(2), sigprocmask(2) ..). sigset() sig. disp : SIG_DFL sig . SIG_IGN sig. SIG_HOLD sig , sig . disp , sig . disp SIG_HOLD, sig . SIGKILL SIGSTOP . sighold() sig . sigrelse() sig . sigignore() sig SIG_IGN. sigset() SIG_HOLD, sig , , . sigset() -1, errno ( ). sighold(), sigrelse() sigignore() 0; -1, errno -- . sigset() sigaction(2) sigprocmask(2). sighold() sigrelse() sigprocmask(2). sigignore() sigaction(2). attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |sigset(), sighold(), | | MT-Safe | |sigrelse(), sigignore() | | | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1-2008. sighandler_t GNU. POSIX.1 uses the same type but without a typedef. glibc 2.1. SVr4, POSIX.1-2001. POSIX.1-2008 marks these functions as obsolete, recommending the use of sigaction(2), sigprocmask(2), pthread_sigmask(3), and sigsuspend(2) instead. sigset() ( sigaction(2) sa_mask 0). System V, signal() ( sigaction(2) sa_mask SA_RESETHAND | SA_NODEFER). BSD, signal() . POSIX.1-2001 signal() . signal(2). BSD System V sigpause(3), . sigpause(3). Before glibc 2.2, sigset() did not unblock sig if disp was specified as a value other than SIG_HOLD. Before glibc 2.5, sigset() does not correctly return the previous disposition of the signal in two cases. First, if disp is specified as SIG_HOLD, then a successful sigset() always returns SIG_HOLD. Instead, it should return the previous disposition of the signal (unless the signal was blocked, in which case SIG_HOLD should be returned). Second, if the signal is currently blocked, then the return value of a successful sigset() should be SIG_HOLD. Instead, the previous disposition of the signal is returned. These problems have been fixed since glibc 2.5. . kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), raise(3), sigpause(3), sigvec(3), signal(7) Alexander Golubev , Azamat Hackimov , Hotellook, Nikita , Spiros Georgaras , Vladislav , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . sigset(3)