blob: e988efded6ab19c8c171091fd5d8022480d45c91 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 685645a20e39cf2ab7db8d1f5e3666a4228abca8 Mon Sep 17 00:00:00 2001
2From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
3Date: Wed, 8 Jul 2015 09:44:57 +0300
4Subject: [PATCH 1/1] dpkg start-stop-daemon: Accept SIG prefixed signal names
5
6---
7 utils/start-stop-daemon.c | 9 +++++++++
8 1 file changed, 9 insertions(+)
9
10diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
11index 6aebe9b..e805082 100644
12--- a/utils/start-stop-daemon.c
13+++ b/utils/start-stop-daemon.c
14@@ -18,6 +18,9 @@
15 * and Andreas Schuldei <andreas@schuldei.org>
16 *
17 * Changes by Ian Jackson: added --retry (and associated rearrangements).
18+ *
19+ * Changes by Haris Okanovic <haris.okanovic@ni.com> to support 'SIG'
20+ * prefixed signal names placed in public domain as well.
21 */
22
23 #include <config.h>
24@@ -661,6 +664,12 @@ parse_signal(const char *sig_str, int *sig_num)
25 if (parse_unsigned(sig_str, 10, sig_num) == 0)
26 return 0;
27
28+ /* Skip over optional "SIG" prefix */
29+ if (strncmp(sig_str, "SIG", 3) == 0) {
30+ warning("Using deprecated signal name %s. Drop the 'SIG' prefix.\n", sig_str);
31+ sig_str += 3;
32+ }
33+
34 for (i = 0; i < array_count(siglist); i++) {
35 if (strcmp(sig_str, siglist[i].name) == 0) {
36 *sig_num = siglist[i].signal;
37--
382.1.4
39