12 #ifndef ZYPP_BASE_SIGNAL_H
13 #define ZYPP_BASE_SIGNAL_H
46 { ::sigprocmask( SIG_SETMASK, NULL, &
_origmask ); }
49 { ::sigprocmask( SIG_SETMASK, &
_origmask, NULL ); }
55 ::sigemptyset( & mask );
56 ::sigaddset( & mask, signum_r );
57 ::sigprocmask( SIG_BLOCK, &mask, NULL );
63 ::sigemptyset( & mask );
64 ::sigaddset( & mask, signum_r );
65 ::sigprocmask( SIG_UNBLOCK, &mask, NULL );
71 ::sigpending( &mask );
72 return ::sigismember( &mask, signum_r );
84 #endif // ZYPP_BASE_SIGNAL_H
void block(int signum_r)
Temporary block signal.
Exception safe sigprocmask save/restore.
~SigprocmaskSaver()
Dtor restoring the original sigprocmask.
void unblock(int signum_r)
Temporary unblock signal.
::sighandler_t _orighandler
void suspend()
Wait for signals not blocked in original sigprocmask.
SigprocmaskSaver()
Ctor saving the original sigprocmask.
Exception safe signal handler save/restore.
SignalSaver(int signum_r, sighandler_t handler_r)
bool pending(int signum_r)
Whether signal delivery is pending.