1 /* Signal number definitions.  Linux version.
2    Copyright (C) 1995, 1997, 1998 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, see
17    <http://www.gnu.org/licenses/>.  */
18 
19 #ifdef	_SIGNAL_H
20 
21 #define SIGHUP		 1	/* Hangup (POSIX).  */
22 #define SIGINT		 2	/* Interrupt (ANSI).  */
23 #define SIGQUIT		 3	/* Quit (POSIX).  */
24 #define SIGILL		 4	/* Illegal instruction (ANSI).  */
25 #define SIGTRAP		 5	/* Trace trap (POSIX).  */
26 #define SIGIOT		 6	/* IOT trap (4.2 BSD).  */
27 #define SIGABRT		 SIGIOT	/* Abort (ANSI).  */
28 #define SIGEMT		 7
29 #define SIGFPE		 8	/* Floating-point exception (ANSI).  */
30 #define SIGKILL		 9	/* Kill, unblockable (POSIX).  */
31 #define SIGBUS		10	/* BUS error (4.2 BSD).  */
32 #define SIGSEGV		11	/* Segmentation violation (ANSI).  */
33 #define SIGSYS		12
34 #define SIGPIPE		13	/* Broken pipe (POSIX).  */
35 #define SIGALRM		14	/* Alarm clock (POSIX).  */
36 #define SIGTERM		15	/* Termination (ANSI).  */
37 #define SIGUSR1		16	/* User-defined signal 1 (POSIX).  */
38 #define SIGUSR2		17	/* User-defined signal 2 (POSIX).  */
39 #define SIGCHLD		18	/* Child status has changed (POSIX).  */
40 #define SIGCLD		SIGCHLD	/* Same as SIGCHLD (System V).  */
41 #define SIGPWR		19	/* Power failure restart (System V).  */
42 #define SIGWINCH	20	/* Window size change (4.3 BSD, Sun).  */
43 #define SIGURG		21	/* Urgent condition on socket (4.2 BSD).  */
44 #define SIGIO		22	/* I/O now possible (4.2 BSD).  */
45 #define SIGPOLL		SIGIO	/* Pollable event occurred (System V).  */
46 #define SIGSTOP		23	/* Stop, unblockable (POSIX).  */
47 #define SIGTSTP		24	/* Keyboard stop (POSIX).  */
48 #define SIGCONT		25	/* Continue (POSIX).  */
49 #define SIGTTIN		26	/* Background read from tty (POSIX).  */
50 #define SIGTTOU		27	/* Background write to tty (POSIX).  */
51 #define SIGVTALRM	28	/* Virtual alarm clock (4.2 BSD).  */
52 #define SIGPROF		29	/* Profiling alarm clock (4.2 BSD).  */
53 #define SIGXCPU		30	/* CPU limit exceeded (4.2 BSD).  */
54 #define SIGXFSZ		31	/* File size limit exceeded (4.2 BSD).  */
55 
56 /* MIPS is special by having 128 signals.
57  * All (?) other architectures have at most 64 signals.
58  * Having 128 signals is problematic because signal nos are 1-based
59  * and last signal number is then 128.
60  * This plays havoc with WIFSIGNALED and WCOREDUMP in waitpid status word,
61  * when process dies from signal 128.
62  * Linux kernel 3.9 accepts signal 128, with awful results :/
63  * It is being fixed.
64  *
65  * glibc (accidentally?) papers over this issue by declaring _NSIG to be 128,
66  * not 129 (despite claiming that _NSIG is "biggest signal number + 1"
67  * in the comment above that definition). We follow suit.
68  * Note that this results in __SIGRTMAX == 127. It is intended.
69  */
70 #define _NSIG		128
71 
72 #endif	/* <signal.h> included.  */
73