blob: e988efded6ab19c8c171091fd5d8022480d45c91 [file] [log] [blame]
From 685645a20e39cf2ab7db8d1f5e3666a4228abca8 Mon Sep 17 00:00:00 2001
From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Date: Wed, 8 Jul 2015 09:44:57 +0300
Subject: [PATCH 1/1] dpkg start-stop-daemon: Accept SIG prefixed signal names
---
utils/start-stop-daemon.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 6aebe9b..e805082 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -18,6 +18,9 @@
* and Andreas Schuldei <andreas@schuldei.org>
*
* Changes by Ian Jackson: added --retry (and associated rearrangements).
+ *
+ * Changes by Haris Okanovic <haris.okanovic@ni.com> to support 'SIG'
+ * prefixed signal names placed in public domain as well.
*/
#include <config.h>
@@ -661,6 +664,12 @@ parse_signal(const char *sig_str, int *sig_num)
if (parse_unsigned(sig_str, 10, sig_num) == 0)
return 0;
+ /* Skip over optional "SIG" prefix */
+ if (strncmp(sig_str, "SIG", 3) == 0) {
+ warning("Using deprecated signal name %s. Drop the 'SIG' prefix.\n", sig_str);
+ sig_str += 3;
+ }
+
for (i = 0; i < array_count(siglist); i++) {
if (strcmp(sig_str, siglist[i].name) == 0) {
*sig_num = siglist[i].signal;
--
2.1.4