Signals question - Unix
This is a discussion on Signals question - Unix ; Hi
Is there a way to define a handler for an entire signal set in one
function call instead of manually having to call sigaction() (or
signal()) for each signal? It seems odd you can block/unblock all
signals using a ...
-
Signals question
Hi
Is there a way to define a handler for an entire signal set in one
function call instead of manually having to call sigaction() (or
signal()) for each signal? It seems odd you can block/unblock all
signals using a sigset_t with sigprocmask() but not obvious way to set
the handler so easily.
Thanks for any help
B2003
-
Re: Signals question
thagor2008@googlemail.com wrote:
> Is there a way to define a handler for an entire signal set in one
> function call instead of manually having to call sigaction() (or
> signal()) for each signal? It seems odd you can block/unblock all
> signals using a sigset_t with sigprocmask() but not obvious way to set
> the handler so easily.
Not that I would know. But setting a signal handler is a bit
different from (un)blocking a set of signals since it has to
return the old signal handler so it can be restored. I guess
that setting the same handler for a lot of signals is to rare
a problem that it would have been thought of as requiring a
specialized function when a rather simple loop will do.
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de