1 /* siglist.c -- signal list for those machines that don't have one. */
3 /* Copyright (C) 1989 Free Software Foundation, Inc.
5 This file is part of GNU Bash, the Bourne Again SHell.
7 Bash is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 1, or (at your option) any later
12 Bash is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License along
18 with Bash; see the file COPYING. If not, write to the Free Software
19 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
22 #include <sys/types.h>
31 char *sys_siglist[NSIG];
33 extern char *xmalloc (), *malloc ();
40 for (i = 0; i < NSIG; i++)
41 sys_siglist[i] = (char *)0x0;
43 sys_siglist[0] = "Bogus signal";
46 sys_siglist[SIGHUP] = "Hangup";
50 sys_siglist[SIGINT] = "Interrupt";
54 sys_siglist[SIGQUIT] = "Quit";
58 sys_siglist[SIGILL] = "Illegal instruction";
62 sys_siglist[SIGTRAP] = "BPT trace/trap";
65 #if defined (SIGIOT) && !defined (SIGABRT)
66 #define SIGABRT SIGIOT
70 sys_siglist[SIGABRT] = "ABORT instruction";
74 sys_siglist[SIGEMT] = "EMT instruction";
78 sys_siglist[SIGFPE] = "Floating point exception";
82 sys_siglist[SIGKILL] = "Killed";
86 sys_siglist[SIGBUS] = "Bus error";
90 sys_siglist[SIGSEGV] = "Segmentation fault";
94 sys_siglist[SIGSYS] = "Bad system call";
98 sys_siglist[SIGPIPE] = "Broken pipe";
101 #if defined (SIGALRM)
102 sys_siglist[SIGALRM] = "Alarm clock";
105 #if defined (SIGTERM)
106 sys_siglist[SIGTERM] = "Terminated";
110 sys_siglist[SIGURG] = "Urgent IO condition";
113 #if defined (SIGSTOP)
114 sys_siglist[SIGSTOP] = "Stopped (signal)";
117 #if defined (SIGTSTP)
118 sys_siglist[SIGTSTP] = "Stopped";
121 #if defined (SIGCONT)
122 sys_siglist[SIGCONT] = "Continue";
125 #if !defined (SIGCHLD) && defined (SIGCLD)
126 #define SIGCHLD SIGCLD
129 #if defined (SIGCHLD)
130 sys_siglist[SIGCHLD] = "Child death or stop";
133 #if defined (SIGTTIN)
134 sys_siglist[SIGTTIN] = "Stopped (tty input)";
137 #if defined (SIGTTOU)
138 sys_siglist[SIGTTOU] = "Stopped (tty output)";
142 sys_siglist[SIGIO] = "I/O ready";
145 #if defined (SIGXCPU)
146 sys_siglist[SIGXCPU] = "CPU limit";
149 #if defined (SIGXFSZ)
150 sys_siglist[SIGXFSZ] = "File limit";
153 #if defined (SIGVTALRM)
154 sys_siglist[SIGVTALRM] = "Alarm (virtual)";
157 #if defined (SIGPROF)
158 sys_siglist[SIGPROF] = "Alarm (profile)";
161 #if defined (SIGWINCH)
162 sys_siglist[SIGWINCH] = "Window changed";
165 #if defined (SIGLOST)
166 sys_siglist[SIGLOST] = "Record lock";
169 #if defined (SIGUSR1)
170 sys_siglist[SIGUSR1] = "User signal 1";
173 #if defined (SIGUSR2)
174 sys_siglist[SIGUSR2] = "User signal 2";
178 sys_siglist[SIGMSG] = "HFT input data pending";
182 sys_siglist[SIGPWR] = "power failure imminent";
185 #if defined (SIGDANGER)
186 sys_siglist[SIGDANGER] = "system crash imminent";
189 #if defined (SIGMIGRATE)
190 sys_siglist[SIGMIGRATE] = "migrate process to another CPU";
194 sys_siglist[SIGPRE] = "programming error";
197 #if defined (SIGGRANT)
198 sys_siglist[SIGGRANT] = "HFT monitor mode granted";
201 #if defined (SIGRETRACT)
202 sys_siglist[SIGRETRACT] = "HFT monitor mode retracted";
205 #if defined (SIGSOUND)
206 sys_siglist[SIGSOUND] = "HFT sound sequence has completed";
209 for (i = 0; i < NSIG; i++)
214 (char *)xmalloc (10 + strlen ("Unknown Signal #"));
216 sprintf (sys_siglist[i], "Unknown Signal #%d", i);