aboutsummaryrefslogtreecommitdiff
path: root/src/rc
diff options
context:
space:
mode:
authorDoug Freed <dwfreed@mtu.edu>2017-01-08 10:48:53 +0000
committerWilliam Hubbs <w.d.hubbs@gmail.com>2017-01-25 17:48:52 -0600
commit6dcb6929869c2f81c1f8d0930191f74fc6dfaa3e (patch)
tree5dedfbd7229b782c9428679082816cd1a6f10a2e /src/rc
parente2e652e469efa5f3ebcd69828ff16d8f5ad3f1b8 (diff)
start-stop-daemon: allow all standard signals
Also we define the signalpair_item macro. This fixes #113. X-Gentoo-Bug: 604986 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604986
Diffstat (limited to 'src/rc')
-rw-r--r--src/rc/start-stop-daemon.c57
1 files changed, 38 insertions, 19 deletions
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
index b1c6e73d..e9f9848c 100644
--- a/src/rc/start-stop-daemon.c
+++ b/src/rc/start-stop-daemon.c
@@ -197,26 +197,45 @@ parse_signal(const char *sig)
int signal;
} SIGNALPAIR;
+#define signalpair_item(name) { #name, SIG##name },
+
static const SIGNALPAIR signallist[] = {
- { "ABRT", SIGABRT },
- { "ALRM", SIGALRM },
- { "FPE", SIGFPE },
- { "HUP", SIGHUP },
- { "ILL", SIGILL },
- { "INT", SIGINT },
- { "KILL", SIGKILL },
- { "PIPE", SIGPIPE },
- { "QUIT", SIGQUIT },
- { "SEGV", SIGSEGV },
- { "TERM", SIGTERM },
- { "USR1", SIGUSR1 },
- { "USR2", SIGUSR2 },
- { "CHLD", SIGCHLD },
- { "CONT", SIGCONT },
- { "STOP", SIGSTOP },
- { "TSTP", SIGTSTP },
- { "TTIN", SIGTTIN },
- { "TTOU", SIGTTOU },
+ signalpair_item(HUP)
+ signalpair_item(INT)
+ signalpair_item(QUIT)
+ signalpair_item(ILL)
+ signalpair_item(TRAP)
+ signalpair_item(ABRT)
+ signalpair_item(BUS)
+ signalpair_item(FPE)
+ signalpair_item(KILL)
+ signalpair_item(USR1)
+ signalpair_item(SEGV)
+ signalpair_item(USR2)
+ signalpair_item(PIPE)
+ signalpair_item(ALRM)
+ signalpair_item(TERM)
+ signalpair_item(CHLD)
+ signalpair_item(CONT)
+ signalpair_item(STOP)
+ signalpair_item(TSTP)
+ signalpair_item(TTIN)
+ signalpair_item(TTOU)
+ signalpair_item(URG)
+ signalpair_item(XCPU)
+ signalpair_item(XFSZ)
+ signalpair_item(VTALRM)
+ signalpair_item(PROF)
+#ifdef SIGWINCH
+ signalpair_item(WINCH)
+#endif
+#ifdef SIGIO
+ signalpair_item(IO)
+#endif
+#ifdef SIGPWR
+ signalpair_item(PWR)
+#endif
+ signalpair_item(SYS)
{ "NULL", 0 },
};