next up previous contents
Next: unlink: delete a file Up: MOSS system calls Previous: sigpending: find the set

sigprocmask: change the signal mask of the current process

SYNOPSIS

int sigprocmask(int how, const sigset_t *set, sigset_t *old_set);

DESCRIPTION

This system call implements the POSIX sigprocmask function, which changes the current signal mask of the running program.

Under MOSS, this function can be used to prevent signals generated by hardware interrupts from being dispatched to the process until the appropriate signal is unblocked again. However, note that the signal will automatically remain blocked while the interrupt handler is running, so it is usually not necessary to call this function.

You should not try to block any of the signals that can be generated by processor exceptions, such as SIGILL, SIGSEGV, etc.

PARAMETERS

how
Indicates how to change the signal mask:
  • SIG_BLOCK: add the signals in set to the current signal mask.
  • SIG_UNBLOCK: unblock the signals in set.
  • SIG_SETMASK: Change the current signal mask to set.
set
If non-NULL, indicates the signals to change.
old_set
If non-NULL, the previous signal mask is stored here.

RETURN VALUE

Returns 0 if successful, or -1 on error, in which case errno indicates the error.



Bryan Ford