signals.h 1.68 KB
Newer Older
Russ Cox's avatar
Russ Cox committed
1 2 3 4 5 6 7
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

#define C SigCatch
#define I SigIgnore
#define R SigRestart
David Symonds's avatar
David Symonds committed
8
#define Q SigQueue
Russ Cox's avatar
Russ Cox committed
9 10 11

static SigTab sigtab[] = {
	/* 0 */	0, "SIGNONE: no trap",
David Symonds's avatar
David Symonds committed
12 13
	/* 1 */	Q+R, "SIGHUP: terminal line hangup",
	/* 2 */	Q+R, "SIGINT: interrupt",
Russ Cox's avatar
Russ Cox committed
14 15 16 17 18 19 20
	/* 3 */	C, "SIGQUIT: quit",
	/* 4 */	C, "SIGILL: illegal instruction",
	/* 5 */	C, "SIGTRAP: trace trap",
	/* 6 */	C, "SIGABRT: abort",
	/* 7 */	C, "SIGBUS: bus error",
	/* 8 */	C, "SIGFPE: floating-point exception",
	/* 9 */	0, "SIGKILL: kill",
21
	/* 10 */	Q+I+R, "SIGUSR1: user-defined signal 1",
Russ Cox's avatar
Russ Cox committed
22
	/* 11 */	C, "SIGSEGV: segmentation violation",
23
	/* 12 */	Q+I+R, "SIGUSR2: user-defined signal 2",
24
	/* 13 */	I, "SIGPIPE: write to broken pipe",
25
	/* 14 */	Q+I+R, "SIGALRM: alarm clock",
David Symonds's avatar
David Symonds committed
26
	/* 15 */	Q+R, "SIGTERM: termination",
27 28
	/* 16 */	C, "SIGSTKFLT: stack fault",
	/* 17 */	I+R, "SIGCHLD: child status has changed",
Russ Cox's avatar
Russ Cox committed
29 30
	/* 18 */	0, "SIGCONT: continue",
	/* 19 */	0, "SIGSTOP: stop, unblockable",
31 32 33 34 35 36 37 38 39 40 41
	/* 20 */	Q+I+R, "SIGTSTP: keyboard stop",
	/* 21 */	Q+I+R, "SIGTTIN: background read from tty",
	/* 22 */	Q+I+R, "SIGTTOU: background write to tty",
	/* 23 */	Q+I+R, "SIGURG: urgent condition on socket",
	/* 24 */	Q+I+R, "SIGXCPU: cpu limit exceeded",
	/* 25 */	Q+I+R, "SIGXFSZ: file size limit exceeded",
	/* 26 */	Q+I+R, "SIGVTALRM: virtual alarm clock",
	/* 27 */	Q+I+R, "SIGPROF: profiling alarm clock",
	/* 28 */	Q+I+R, "SIGWINCH: window size change",
	/* 29 */	Q+I+R, "SIGIO: i/o now possible",
	/* 30 */	Q+I+R, "SIGPWR: power failure restart",
Russ Cox's avatar
Russ Cox committed
42 43 44 45 46
	/* 31 */	C, "SIGSYS: bad system call",
};
#undef C
#undef I
#undef R
David Symonds's avatar
David Symonds committed
47
#undef Q
Russ Cox's avatar
Russ Cox committed
48 49

#define	NSIG 32