Back to index

glibc  2.9
sigaction.h
Go to the documentation of this file.
00001 /* Structure and constant definitions for sigaction et al.  OSF/1 version.
00002    Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004    Contributed by Brendan Kehoe (brendan@zen.org).
00005 
00006    The GNU C Library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public
00008    License as published by the Free Software Foundation; either
00009    version 2.1 of the License, or (at your option) any later version.
00010 
00011    The GNU C Library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with the GNU C Library; if not, write to the Free
00018    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019    02111-1307 USA.  */
00020 
00021 #ifndef _SIGNAL_H
00022 # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
00023 #endif
00024 
00025 /* Structure describing the action to be taken when a signal arrives.  */
00026 struct sigaction
00027   {
00028     /* Signal handler.  */
00029     __sighandler_t sa_handler;
00030 
00031     /* Additional set of signals to be blocked.  */
00032     __sigset_t sa_mask;
00033 
00034     /* Special flags.  */
00035     int sa_flags;
00036   };
00037 
00038 /* Bits in `sa_flags'.  */
00039 #ifdef __USE_BSD
00040 # define SA_ONSTACK  0x1    /* Take signal on signal stack.  */
00041 # define SA_RESTART  0x2    /* Restart syscall on signal return.  */
00042 # define SA_DISABLE  0x4    /* Disable alternate signal stack.  */
00043 #endif
00044 #define       SA_NOCLDSTOP  0x4    /* Don't send SIGCHLD when children stop.  */
00045 
00046 
00047 /* Values for the HOW argument to `sigprocmask'.  */
00048 #define       SIG_BLOCK     1      /* Block signals.  */
00049 #define       SIG_UNBLOCK   2      /* Unblock signals.  */
00050 #define       SIG_SETMASK   3      /* Set the set of blocked signals.  */