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 );
Exception safe signal handler save/restore.
::sighandler_t _orighandler
SignalSaver(int signum_r, sighandler_t handler_r)
Exception safe sigprocmask save/restore.
~SigprocmaskSaver()
Dtor restoring the original sigprocmask.
void block(int signum_r)
Temporary block signal.
SigprocmaskSaver()
Ctor saving the original sigprocmask.
bool pending(int signum_r)
Whether signal delivery is pending.
void unblock(int signum_r)
Temporary unblock signal.
void suspend()
Wait for signals not blocked in original sigprocmask.
Easy-to use interface to the ZYPP dependency resolver.