1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
From: Matthew Palmer <mpalmer@debian.org>
Date: Tue, 2 Feb 2010 23:03:31 +1100
Subject: daemontools sigq12
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=568092;filename=daemontools_sigq12.patch;msg=5
---
daemontools-0.76/src/supervise.c | 9 +++++++++
daemontools-0.76/src/svc.c | 4 ++--
debian/daemontools-man/svc.8 | 15 +++++++++++++++
3 files changed, 26 insertions(+), 2 deletions(-)
Index: daemontools/daemontools-0.76/src/supervise.c
===================================================================
--- daemontools.orig/daemontools-0.76/src/supervise.c
+++ daemontools/daemontools-0.76/src/supervise.c
@@ -195,6 +195,15 @@ void doit(void)
case 'i':
if (pid) kill(pid,SIGINT);
break;
+ case 'q':
+ if (pid) kill(pid,SIGQUIT);
+ break;
+ case '1':
+ if (pid) kill(pid,SIGUSR1);
+ break;
+ case '2':
+ if (pid) kill(pid,SIGUSR2);
+ break;
case 'p':
flagpaused = 1;
announce();
Index: daemontools/daemontools-0.76/src/svc.c
===================================================================
--- daemontools.orig/daemontools-0.76/src/svc.c
+++ daemontools/daemontools-0.76/src/svc.c
@@ -27,9 +27,9 @@ int main(int argc,const char *const *arg
sig_ignore(sig_pipe);
- while ((opt = getopt(argc,argv,"udopchaitkx")) != opteof)
+ while ((opt = getopt(argc,argv,"udopchaitkxq12")) != opteof)
if (opt == '?')
- strerr_die1x(100,"svc options: u up, d down, o once, x exit, p pause, c continue, h hup, a alarm, i interrupt, t term, k kill");
+ strerr_die1x(100,"svc options: u up, d down, o once, x exit, p pause, c continue, h hup, a alarm, i interrupt, t term, k kill, q quit, 1 usr1, 2 usr2");
else
if (datalen < sizeof data)
if (byte_chr(data,datalen,opt) == datalen)
|