I\'ve blocked, and then waited for a signal via the following code:
sigset_t set;
sigfillset(&set); // all signals
sigprocmask(SIG_SETMASK, &set, NUL
I'm not aware of the way to do it.
Only suggestion I have is to look into the man 7 signal
and perform manually the action according the table you see there. Ign
is nothing. Core
is call to abort()
. Term
is _exit()
.
Of course you can also set signal handler back to SIG_DFL and then kill(getpid(),THE_SIG)
(or its equivalent raise(THE_SIG)
). (I personally do not like raise
because on some systems it might produce some messages on stderr.)