Back to index

glibc  2.9
Functions
sigprocmask.c File Reference
#include <errno.h>
#include <stddef.h>
#include <signal.h>

Go to the source code of this file.

Functions

int __sigprocmask (int how, const sigset_t *set, sigset_t *oset)

Function Documentation

int __sigprocmask ( int  how,
const sigset_t set,
sigset_t oset 
)

Definition at line 28 of file sigprocmask.c.

{
  int mask;

  if (set != NULL)
    {
      mask = *set;
      switch (how)
       {
       case SIG_BLOCK:
         mask = __sigblock (mask);
         break;

       case SIG_UNBLOCK:
         mask = __sigblock (0) & ~mask;
         /* Fall through.  */

       case SIG_SETMASK:
         mask = __sigsetmask (mask);
         break;

       default:
         __set_errno (EINVAL);
         return -1;
       }
    }
  else
    mask = __sigblock (0);

  if (oset != NULL)
    *oset = mask;

  return 0;
}

Here is the call graph for this function: