1 /* siglist.c -- signal list for those machines that don't have one. */
3 /* Copyright (C) 1989-2009 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
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 Bash is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Bash. If not, see <http://www.gnu.org/licenses/>.
23 #if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_UNDER_SYS_SIGLIST) && !defined (HAVE_STRSIGNAL)
26 #include "bashtypes.h"
38 char *sys_siglist
[NSIG
];
45 for (i
= 0; i
< NSIG
; i
++)
46 sys_siglist
[i
] = (char *)0x0;
48 sys_siglist
[0] = _("Bogus signal");
51 sys_siglist
[SIGHUP
] = _("Hangup");
55 sys_siglist
[SIGINT
] = _("Interrupt");
59 sys_siglist
[SIGQUIT
] = _("Quit");
63 sys_siglist
[SIGILL
] = _("Illegal instruction");
67 sys_siglist
[SIGTRAP
] = _("BPT trace/trap");
70 #if defined (SIGIOT) && !defined (SIGABRT)
71 #define SIGABRT SIGIOT
75 sys_siglist
[SIGABRT
] = _("ABORT instruction");
79 sys_siglist
[SIGEMT
] = _("EMT instruction");
83 sys_siglist
[SIGFPE
] = _("Floating point exception");
87 sys_siglist
[SIGKILL
] = _("Killed");
91 sys_siglist
[SIGBUS
] = _("Bus error");
95 sys_siglist
[SIGSEGV
] = _("Segmentation fault");
99 sys_siglist
[SIGSYS
] = _("Bad system call");
102 #if defined (SIGPIPE)
103 sys_siglist
[SIGPIPE
] = _("Broken pipe");
106 #if defined (SIGALRM)
107 sys_siglist
[SIGALRM
] = _("Alarm clock");
110 #if defined (SIGTERM)
111 sys_siglist
[SIGTERM
] = _("Terminated");
115 sys_siglist
[SIGURG
] = _("Urgent IO condition");
118 #if defined (SIGSTOP)
119 sys_siglist
[SIGSTOP
] = _("Stopped (signal)");
122 #if defined (SIGTSTP)
123 sys_siglist
[SIGTSTP
] = _("Stopped");
126 #if defined (SIGCONT)
127 sys_siglist
[SIGCONT
] = _("Continue");
130 #if !defined (SIGCHLD) && defined (SIGCLD)
131 #define SIGCHLD SIGCLD
134 #if defined (SIGCHLD)
135 sys_siglist
[SIGCHLD
] = _("Child death or stop");
138 #if defined (SIGTTIN)
139 sys_siglist
[SIGTTIN
] = _("Stopped (tty input)");
142 #if defined (SIGTTOU)
143 sys_siglist
[SIGTTOU
] = _("Stopped (tty output)");
147 sys_siglist
[SIGIO
] = _("I/O ready");
150 #if defined (SIGXCPU)
151 sys_siglist
[SIGXCPU
] = _("CPU limit");
154 #if defined (SIGXFSZ)
155 sys_siglist
[SIGXFSZ
] = _("File limit");
158 #if defined (SIGVTALRM)
159 sys_siglist
[SIGVTALRM
] = _("Alarm (virtual)");
162 #if defined (SIGPROF)
163 sys_siglist
[SIGPROF
] = _("Alarm (profile)");
166 #if defined (SIGWINCH)
167 sys_siglist
[SIGWINCH
] = _("Window changed");
170 #if defined (SIGLOST)
171 sys_siglist
[SIGLOST
] = _("Record lock");
174 #if defined (SIGUSR1)
175 sys_siglist
[SIGUSR1
] = _("User signal 1");
178 #if defined (SIGUSR2)
179 sys_siglist
[SIGUSR2
] = _("User signal 2");
183 sys_siglist
[SIGMSG
] = _("HFT input data pending");
187 sys_siglist
[SIGPWR
] = _("power failure imminent");
190 #if defined (SIGDANGER)
191 sys_siglist
[SIGDANGER
] = _("system crash imminent");
194 #if defined (SIGMIGRATE)
195 sys_siglist
[SIGMIGRATE
] = _("migrate process to another CPU");
199 sys_siglist
[SIGPRE
] = _("programming error");
202 #if defined (SIGGRANT)
203 sys_siglist
[SIGGRANT
] = _("HFT monitor mode granted");
206 #if defined (SIGRETRACT)
207 sys_siglist
[SIGRETRACT
] = _("HFT monitor mode retracted");
210 #if defined (SIGSOUND)
211 sys_siglist
[SIGSOUND
] = _("HFT sound sequence has completed");
214 #if defined (SIGINFO)
215 sys_siglist
[SIGINFO
] = _("Information request");
218 for (i
= 0; i
< NSIG
; i
++)
223 (char *)xmalloc (10 + strlen (_("Unknown Signal #")));
225 sprintf (sys_siglist
[i
], _("Unknown Signal #%d"), i
);
229 #endif /* !HAVE_SYS_SIGLIST && !HAVE_UNDER_SYS_SIGLIST && !HAVE_STRSIGNAL */