home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * $Source: /unixb/home/unixlib/source/unixlib37/src/signal/c/RCS/sigsetmask,v $
- * $Date: 1996/10/30 22:04:51 $
- * $Revision: 1.1 $
- * $State: Rel $
- * $Author: unixlib $
- *
- * $Log: sigsetmask,v $
- * Revision 1.1 1996/10/30 22:04:51 unixlib
- * Initial revision
- *
- ***************************************************************************/
-
- static const char rcs_id[] = "$Id: sigsetmask,v 1.1 1996/10/30 22:04:51 unixlib Rel $";
-
- /* sigsetmask.c: BSD signal blocking function.
- Written by Nick Burrett, 5 October 1996. */
-
- #include <errno.h>
- #include <signal.h>
-
- /* Set the mask of blocked signals to MASK, returning the old mask. */
- int sigsetmask (int mask)
- {
- sigset_t set, oset;
-
- set = (sigset_t)mask;
-
- if (sigprocmask(SIG_SETMASK, &set, &oset) < 0)
- return -1;
-
- return (int)oset;
- }
-