signal_action |
Use os_this_process::action()
to take total control of how the current process reacts to a particular signal
or set of signals. This function takes either a signal or a signal set as its
first argument and an os_signal_action object as
its second argument.
An os_signal_action
specifies how a process reacts to signals. The default constructor creates a
signal action that reacts to the signal in the default way. Another constructor
creates a signal action that calls a used-supplied handler and takes the
following parameters.
void (*handler)( int ) .
When the handler is called, the signal number is passed as the handler's
argument. If handler is equal to SIG_DFL
, the default action is performed. If handler
is equal to SIG_IGN , the signal is ignored. We
recommend that you use restore_default() and ignore()
rather than using these options.SA_INTERRUPT (on some platforms), SA_NOCLDSTOP
, and SA_RESETHAND flags.These flags perform the following actions.
SA_INTERRUPT
-If a reentrant system call is being executed when the signal is received,
do not automatically restart it.SA_NOCLDSTOP
-If the specified signal is SIGCHLD , SIGCHLD
signals are not sent to the current process when one of its children
terminates.SA_RESETHAND
-Resets the handler to be the default action after the signal is received
once. Conversions permit os_signal_action
and os_sigaction_t to be used interchangeably.
SIGCHLDtrue
if the object is the same as action .sigaction
structure.true and this action is installed for SIGCHILD
, a SIGCHILD signal is not generated when a
child process terminates. If flag is false
and this action is installed for SIGCHILD , a SIGCHILD
signal is generated when a child process terminates.true
if the object is set to block the delivery of SIGCHLD
when a child process stops.true
if the action is "perform default."true , resets the signal handler when the
signal is delivered. This means that the handler only executes once, unless
it is specifically reenabled. If flag is false,
the handler remains installed and executes each time the signal is
delivered.true
if the object is set to handle only the first signal reception.true
if the action is "ignore."true
if the object is set to restart interrupted system calls.true , restarts an interrupted system call
after the signal handler returns. If flag is false
, the system call returns an error EINTR .Copyright©1994-2026 Recursion
Software LLC
All Rights Reserved - For use by licensed users only. - For use by licensed
users only.