Update from main archive 961219
[glibc.git] / sysdeps / unix / sysv / linux / sigaction.h
blob13a6a0324889a7ba45dbc1c9958a5122ea5ad903
1 /* The proper definitions for Linux's sigaction.
2 Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
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 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
20 /* Structure describing the action to be taken when a signal arrives. */
21 struct sigaction
23 /* Signal handler. */
24 __sighandler_t sa_handler;
26 /* Additional set of signals to be blocked. */
27 __sigset_t sa_mask;
29 /* Special flags. */
30 int sa_flags;
32 /* Restore handler. */
33 void (*sa_restorer) __P ((void));
36 /* Bits in `sa_flags'. */
37 #define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
38 #ifdef __USE_MISC
39 #define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
40 #define SA_RESTART 0x10000000 /* Don't restart syscall on signal return. */
41 #define SA_INTERRUPT 0x20000000 /* Historical no-op. */
42 #define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
43 its handler is being executed. */
44 #define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
46 /* Some aliases for the SA_ constants. */
47 #define SA_NOMASK SA_NODEFER
48 #define SA_ONESHOT SA_RESETHAND
49 #endif
51 /* Values for the HOW argument to `sigprocmask'. */
52 #define SIG_BLOCK 0 /* Block signals. */
53 #define SIG_UNBLOCK 1 /* Unblock signals. */
54 #define SIG_SETMASK 2 /* Set the set of blocked signals. */