Initialize lists of signals using C99 designators
Reviewed by: jilles Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D7601
This commit is contained in:
parent
22536e1556
commit
466522c3ac
@ -36,72 +36,72 @@ __FBSDID("$FreeBSD$");
|
||||
#include <signal.h>
|
||||
|
||||
const char *const sys_signame[NSIG] = {
|
||||
"Signal 0",
|
||||
"HUP", /* SIGHUP */
|
||||
"INT", /* SIGINT */
|
||||
"QUIT", /* SIGQUIT */
|
||||
"ILL", /* SIGILL */
|
||||
"TRAP", /* SIGTRAP */
|
||||
"ABRT", /* SIGABRT */
|
||||
"EMT", /* SIGEMT */
|
||||
"FPE", /* SIGFPE */
|
||||
"KILL", /* SIGKILL */
|
||||
"BUS", /* SIGBUS */
|
||||
"SEGV", /* SIGSEGV */
|
||||
"SYS", /* SIGSYS */
|
||||
"PIPE", /* SIGPIPE */
|
||||
"ALRM", /* SIGALRM */
|
||||
"TERM", /* SIGTERM */
|
||||
"URG", /* SIGURG */
|
||||
"STOP", /* SIGSTOP */
|
||||
"TSTP", /* SIGTSTP */
|
||||
"CONT", /* SIGCONT */
|
||||
"CHLD", /* SIGCHLD */
|
||||
"TTIN", /* SIGTTIN */
|
||||
"TTOU", /* SIGTTOU */
|
||||
"IO", /* SIGIO */
|
||||
"XCPU", /* SIGXCPU */
|
||||
"XFSZ", /* SIGXFSZ */
|
||||
"VTALRM", /* SIGVTALRM */
|
||||
"PROF", /* SIGPROF */
|
||||
"WINCH", /* SIGWINCH */
|
||||
"INFO", /* SIGINFO */
|
||||
"USR1", /* SIGUSR1 */
|
||||
"USR2" /* SIGUSR2 */
|
||||
[0] = "Signal 0",
|
||||
[SIGHUP] = "HUP",
|
||||
[SIGINT] = "INT",
|
||||
[SIGQUIT] = "QUIT",
|
||||
[SIGILL] = "ILL",
|
||||
[SIGTRAP] = "TRAP",
|
||||
[SIGABRT] = "ABRT",
|
||||
[SIGEMT] = "EMT",
|
||||
[SIGFPE] = "FPE",
|
||||
[SIGKILL] = "KILL",
|
||||
[SIGBUS] = "BUS",
|
||||
[SIGSEGV] = "SEGV",
|
||||
[SIGSYS] = "SYS",
|
||||
[SIGPIPE] = "PIPE",
|
||||
[SIGALRM] = "ALRM",
|
||||
[SIGTERM] = "TERM",
|
||||
[SIGURG] = "URG",
|
||||
[SIGSTOP] = "STOP",
|
||||
[SIGTSTP] = "TSTP",
|
||||
[SIGCONT] = "CONT",
|
||||
[SIGCHLD] = "CHLD",
|
||||
[SIGTTIN] = "TTIN",
|
||||
[SIGTTOU] = "TTOU",
|
||||
[SIGIO] = "IO",
|
||||
[SIGXCPU] = "XCPU",
|
||||
[SIGXFSZ] = "XFSZ",
|
||||
[SIGVTALRM] = "VTALRM",
|
||||
[SIGPROF] = "PROF",
|
||||
[SIGWINCH] = "WINCH",
|
||||
[SIGINFO] = "INFO",
|
||||
[SIGUSR1] = "USR1",
|
||||
[SIGUSR2] = "USR2",
|
||||
};
|
||||
|
||||
const char *const sys_siglist[NSIG] = {
|
||||
"Signal 0",
|
||||
"Hangup", /* SIGHUP */
|
||||
"Interrupt", /* SIGINT */
|
||||
"Quit", /* SIGQUIT */
|
||||
"Illegal instruction", /* SIGILL */
|
||||
"Trace/BPT trap", /* SIGTRAP */
|
||||
"Abort trap", /* SIGABRT */
|
||||
"EMT trap", /* SIGEMT */
|
||||
"Floating point exception", /* SIGFPE */
|
||||
"Killed", /* SIGKILL */
|
||||
"Bus error", /* SIGBUS */
|
||||
"Segmentation fault", /* SIGSEGV */
|
||||
"Bad system call", /* SIGSYS */
|
||||
"Broken pipe", /* SIGPIPE */
|
||||
"Alarm clock", /* SIGALRM */
|
||||
"Terminated", /* SIGTERM */
|
||||
"Urgent I/O condition", /* SIGURG */
|
||||
"Suspended (signal)", /* SIGSTOP */
|
||||
"Suspended", /* SIGTSTP */
|
||||
"Continued", /* SIGCONT */
|
||||
"Child exited", /* SIGCHLD */
|
||||
"Stopped (tty input)", /* SIGTTIN */
|
||||
"Stopped (tty output)", /* SIGTTOU */
|
||||
"I/O possible", /* SIGIO */
|
||||
"Cputime limit exceeded", /* SIGXCPU */
|
||||
"Filesize limit exceeded", /* SIGXFSZ */
|
||||
"Virtual timer expired", /* SIGVTALRM */
|
||||
"Profiling timer expired", /* SIGPROF */
|
||||
"Window size changes", /* SIGWINCH */
|
||||
"Information request", /* SIGINFO */
|
||||
"User defined signal 1", /* SIGUSR1 */
|
||||
"User defined signal 2" /* SIGUSR2 */
|
||||
[0] = "Signal 0",
|
||||
[SIGHUP] = "Hangup",
|
||||
[SIGINT] = "Interrupt",
|
||||
[SIGQUIT] = "Quit",
|
||||
[SIGILL] = "Illegal instruction",
|
||||
[SIGTRAP] = "Trace/BPT trap",
|
||||
[SIGABRT] = "Abort trap",
|
||||
[SIGEMT] = "EMT trap",
|
||||
[SIGFPE] = "Floating point exception",
|
||||
[SIGKILL] = "Killed",
|
||||
[SIGBUS] = "Bus error",
|
||||
[SIGSEGV] = "Segmentation fault",
|
||||
[SIGSYS] = "Bad system call",
|
||||
[SIGPIPE] = "Broken pipe",
|
||||
[SIGALRM] = "Alarm clock",
|
||||
[SIGTERM] = "Terminated",
|
||||
[SIGURG] = "Urgent I/O condition",
|
||||
[SIGSTOP] = "Suspended (signal)",
|
||||
[SIGTSTP] = "Suspended",
|
||||
[SIGCONT] = "Continued",
|
||||
[SIGCHLD] = "Child exited",
|
||||
[SIGTTIN] = "Stopped (tty input)",
|
||||
[SIGTTOU] = "Stopped (tty output)",
|
||||
[SIGIO] = "I/O possible",
|
||||
[SIGXCPU] = "Cputime limit exceeded",
|
||||
[SIGXFSZ] = "Filesize limit exceeded",
|
||||
[SIGVTALRM] = "Virtual timer expired",
|
||||
[SIGPROF] = "Profiling timer expired",
|
||||
[SIGWINCH] = "Window size changes",
|
||||
[SIGINFO] = "Information request",
|
||||
[SIGUSR1] = "User defined signal 1",
|
||||
[SIGUSR2] = "User defined signal 2",
|
||||
};
|
||||
const int sys_nsig = sizeof(sys_siglist) / sizeof(sys_siglist[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user