Back to index

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

Go to the source code of this file.

Functions

int __sigsuspend (sigset_t *set) const

Function Documentation

int __sigsuspend ( sigset_t set) const

Definition at line 28 of file sigsuspend.c.

{
  sigset_t oset;
  int save;

  if (set == NULL)
    {
      __set_errno (EINVAL);
      return -1;
    }

  if (sigprocmask (SIG_SETMASK, set, &oset) < 0)
    return -1;

  (void) pause();
  save = errno;

  if (sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL) < 0)
    return -1;

  __set_errno (save);
  return -1;
}

Here is the call graph for this function: