Update copyright dates with scripts/update-copyrights.
[glibc.git] / bits / signum.h
bloba07a9b4bd71edde6a51c811701b03df30f0b38c6
1 /* Signal number constants. Generic version.
2 Copyright (C) 1991-2015 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 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.
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.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifdef _SIGNAL_H
21 /* Fake signal functions. */
23 #define SIG_ERR ((__sighandler_t) -1) /* Error return. */
24 #define SIG_DFL ((__sighandler_t) 0) /* Default action. */
25 #define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
27 #ifdef __USE_UNIX98
28 # define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
29 #endif
31 /* We define here all the signal names listed in POSIX (1003.1-2008).
32 Signals in the 1-15 range are defined with their historical numbers.
33 For other signals specified by POSIX, we use the BSD numbers. */
35 /* ISO C99 signals. */
36 #define SIGINT 2 /* Interactive attention signal. */
37 #define SIGILL 4 /* Illegal instruction. */
38 #define SIGABRT 6 /* Abnormal termination. */
39 #define SIGFPE 8 /* Erroneous arithmetic operation. */
40 #define SIGSEGV 11 /* Invalid access to storage. */
41 #define SIGTERM 15 /* Termination request. */
43 /* Historical signals specified by POSIX. */
44 #define SIGHUP 1 /* Hangup. */
45 #define SIGQUIT 3 /* Quit. */
46 #define SIGTRAP 5 /* Trace/breakpoint trap. */
47 #define SIGKILL 9 /* Killed. */
48 #define SIGBUS 10 /* Bus error. */
49 #define SIGSYS 12 /* Bad system call. */
50 #define SIGPIPE 13 /* Broken pipe. */
51 #define SIGALRM 14 /* Alarm clock. */
53 /* New(er) POSIX signals (1003.1-2008). */
54 #define SIGURG 16 /* High bandwidth data is available at a socket. */
55 #define SIGSTOP 17 /* Stopped (signal). */
56 #define SIGTSTP 18 /* Stopped. */
57 #define SIGCONT 19 /* Continued. */
58 #define SIGCHLD 20 /* Child terminated or stopped. */
59 #define SIGTTIN 21 /* Background read from control terminal. */
60 #define SIGTTOU 22 /* Background write to control terminal. */
61 #define SIGPOLL 23 /* Pollable event occurred (System V). */
62 #define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
63 #define SIGXCPU 24 /* CPU time limit exceeded. */
64 #define SIGXFSZ 25 /* File size limit exceeded. */
65 #define SIGVTALRM 26 /* Virtual timer expired. */
66 #define SIGPROF 27 /* Profiling timer expired. */
67 #define SIGUSR1 30 /* User-defined signal 1. */
68 #define SIGUSR2 31 /* User-defined signal 2. */
70 #define _NSIG 32
72 /* Archaic names for compatibility. */
73 #define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP11 */
74 #define SIGCLD SIGCHLD /* Old System V name */
76 #endif /* <signal.h> included. */