Info

struct sigaction {

_sighandler_t sa_handler;

unsigned long sa_flags;

sigset_t sa_mask; /* mask last for extensibility */

□ sa_handler is a pointer to the handler function invoked by the kernel when a signal arrives.

□ sa_mask contains a bitmask with exactly one bit for each signal available in the system. It is used to block other signals during execution of the handler routine. On completion of the routine, the kernel resets the list of blocked signals to its value prior to signal handling.

□ sa_flags contains additional flags to specify how the signal must be handled; these are documented in various system programming manuals.

The prototype of functions that act as signal handlers is as follows:

Continue reading here: Info

Was this article helpful?

0 0