Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sigsetmask(2) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kill

signal

sigvec

sigblock

sigpause

sigsetmask

Purpose

     Sets the current signal mask.

Syntax

     int sigsetmask (mask)
     int mask;

Description

     The sigsetmask  system call sets the  current signal mask
     as  specified by  the  mask parameter.   The signal  mask
     determines which signals is  blocked from delivery to the
     process.  Signal i is blocked if  the i-th bit in mask is
     a 1.

     Typically,  you would  use  the sigblock  system call  to
     block signals during a critical  section of code and then
     use the sigsetmask system call to restore the mask to the
     previous value returned by the sigblock system call.

     The  sigsetmask  system  call   does  not  allow  &c2del.
     SIGKILL &c2off.   &c2ins.  SIGKILL or SIGSAK  &c2off.  to
     be  blocked.   If a  program  attempts  to block  &c2del.
     SIGKILL,  &c2off.  &c2ins.   SIGKILL  or SIGSAK,  &c2off.
     sigsetmask gives no indication of the error.

Return Value

     Upon successful  completion, the  previous set  of masked
     signals is returned.

Example

     To  set  the  signal  mask  to  block  only  SIGINT  from
     delivery:

       #include <signal.h>

       int prevmask;
        . . .
       prevmask = sigsetmask (1 << (SIGINT - 1));

Related Information

     In this book:   "kill,"  "signal," "sigvec,"  "sigblock,"
     and  "sigpause."

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026