sigwait(3) Library Functions Manual sigwait(3) sigwait - C (libc, -lc) #include int sigwait(const sigset_t *restrict set, int *restrict sig); glibc (. feature_test_macros(7)): sigwait(): Since glibc 2.26: _POSIX_C_SOURCE >= 199506L glibc 2.25 and earlier: _POSIX_C_SOURCE The sigwait() function suspends execution of the calling thread until one of the signals specified in the signal set set becomes pending. For a signal to become pending, it must first be blocked with sigprocmask(2). The function accepts the signal (removes it from the pending list of signals), and returns the signal number in sig. sigwait() , sigwaitinfo(2), : o sigwait() , siginfo_t, . o . sigwait() 0. ( ). EINVAL set . attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |sigwait() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ sigwait() is implemented using sigtimedwait(2); consult its NOTES. glibc sigwait() , NPTL. nptl(7). POSIX.1-2008. POSIX.1-2001. pthread_sigmask(3). sigaction(2), signalfd(2), sigpending(2), sigsuspend(2), sigwaitinfo(2), sigsetops(3), signal(7) () Alexander Golubev , Azamat Hackimov , Hotellook, Nikita , Spiros Georgaras , Vladislav , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . sigwait(3)