Update to LGPL v2.1.
[jlayton/glibc.git] / sysdeps / unix / sysv / sysv4 / bits / sigaction.h
1 /* The proper definitions for SVR4's sigaction.
2    Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
4
5    The GNU C Library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
9
10    The GNU C Library is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
14
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library; if not, write to the Free
17    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18    02111-1307 USA.  */
19
20 #ifndef _SIGNAL_H
21 # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
22 #endif
23
24 /* Structure describing the action to be taken when a signal arrives.  */
25 struct sigaction
26   {
27     /* Special flags.  */
28     int sa_flags;
29
30     /* Signal handler.  */
31     __sighandler_t sa_handler;
32
33     /* Additional set of signals to be blocked.  */
34     __sigset_t sa_mask;
35
36     /* Padding.  */
37     int sa_resv[2];
38   };
39
40 /* Bits in `sa_flags'.  */
41 #ifdef __USE_MISC
42 # define SA_ONSTACK     0x1     /* Take signal on signal stack.  */
43 # define SA_RESETHAND   0x2     /* Reset to SIG_DFL on entry to handler.  */
44 # define SA_RESTART     0x4     /* Restart syscall on signal return.  */
45 # define SA_SIGINFO     0x8     /* Provide additional info to the handler.  */
46 # define SA_NODEFER     0x10    /* Don't automatically block the signal when
47                                    its handler is being executed.  */
48 # define SA_NOCLDWAIT   0x10000 /* Don't save zombie processes.  */
49 #endif
50 #define SA_NOCLDSTOP    0x20000 /* Don't send SIGCHLD when children stop.  */
51
52 /* Values for the HOW argument to `sigprocmask'.  */
53 #define SIG_BLOCK       1       /* Block signals.  */
54 #define SIG_UNBLOCK     2       /* Unblock signals.  */
55 #define SIG_SETMASK     3       /* Set the set of blocked signals.  */