block_signal, unblock_signal
block_signal,
unblock_signal — delimit signal blocking.
block_signal (signo)
unblock_signal (signo)
signoThe integer signal number as defined by the operating system.
Symbols such as SIGINT are defined to
provide an operating-system independent method for specifying
this number. (see signal)
block_signal causes a particular signal to be blocked
until a call to unblock_signal is made. If the signal
actually occurred while it was blocked, it will occur immediately when
unblock_signal is called. Multiple occurrences of
the signal while it was blocked will cause the signal to be reported
multiple times when unblock_signal is called on most
operating systems. Code that blocks signals should be surrounded by a call
to unwind_protect.
Gamma>block_signal(14);tGamma>kill(getpid(),14);tGamma>unblock_signal(14);Alarm clock
Gamma>block_signal (SIGINT);tGamma>critical_function();<function return>Gamma>unblock_signal (SIGINT);t