Back to index

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