* [gentoo-commits] proj/openrc:0.23.x commit in: src/rc/
@ 2017-01-26 16:36 William Hubbs
0 siblings, 0 replies; only message in thread
From: William Hubbs @ 2017-01-26 16:36 UTC (permalink / raw
To: gentoo-commits
commit: 2e22b32f600676495e5d5a6ccbf7b307c0588b1a
Author: Doug Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Sun Jan 8 10:48:53 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Jan 26 16:32:48 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=2e22b32f
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
src/rc/start-stop-daemon.c | 57 ++++++++++++++++++++++++++++++----------------
1 file changed, 38 insertions(+), 19 deletions(-)
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
index b1c6e73..e9f9848 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 },
};
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-26 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-26 16:36 [gentoo-commits] proj/openrc:0.23.x commit in: src/rc/ William Hubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox