This data type is the BSD equivalent of
struct sigaction
(see Advanced Signal Handling); it is used to specify signal actions to thesigvec
function. It contains the following members:
sighandler_t sv_handler
- This is the handler function.
int sv_mask
- This is the mask of additional signals to be blocked while the handler function is being called.
int sv_flags
- This is a bit mask used to specify various flags which affect the behavior of the signal. You can also refer to this field as
sv_onstack
.
These symbolic constants can be used to provide values for the
sv_flags
field of a sigvec
structure. This field is a bit
mask value, so you bitwise-OR the flags of interest to you together.
If this bit is set in the
sv_flags
field of asigvec
structure, it means to use the signal stack when delivering the signal.
If this bit is set in the
sv_flags
field of asigvec
structure, it means that system calls interrupted by this kind of signal should not be restarted if the handler returns; instead, the system calls should return with aEINTR
error status. See Interrupted Primitives.
If this bit is set in the
sv_flags
field of asigvec
structure, it means to reset the action for the signal back toSIG_DFL
when the signal is received.
This function is the equivalent of
sigaction
(see Advanced Signal Handling); it installs the action action for the signal signum, returning information about the previous action in effect for that signal in old-action.
This function specifies which approach to use when certain primitives are interrupted by handling signal signum. If failflag is false, signal signum restarts primitives. If failflag is true, handling signum causes these primitives to fail with error code
EINTR
. See Interrupted Primitives.