From 5944840b7e27b9a732c20e5013a796eb092bf319 Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Sun, 4 Oct 2009 20:20:57 +0000 Subject: * sv.c: on 'down', send runsv the 'down' command properly if not yet done (e.g. when taken up with 'once'). --- package/CHANGES | 2 ++ src/sv.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package/CHANGES b/package/CHANGES index 7114034..601773a 100644 --- a/package/CHANGES +++ b/package/CHANGES @@ -1,6 +1,8 @@ 2.1.1 * doc/upgrade.html: fix typo. + * sv.c: on 'down', send runsv the 'down' command properly if not yet + done (e.g. when taken up with 'once'). 2.1.0 Thu, 24 Sep 2009 22:49:33 +0000 diff --git a/src/sv.c b/src/sv.c index 0db0b1e..d126cee 100644 --- a/src/sv.c +++ b/src/sv.c @@ -246,7 +246,8 @@ int check(char *a) { } int control(char *a) { if (svstatus_get() <= 0) return(-1); - if (svstatus[17] == *a) return(0); + if (svstatus[17] == *a) + if (*a != 'd' || svstatus[18] == 1) return(0); /* once w/o term */ if ((fd =open_write("supervise/control")) == -1) { if (errno != error_nodevice) warn("unable to open supervise/control"); -- cgit 1.4.1