runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit cf6b7101fb536ddd0976f57b9a9ac2f8aa663790
parent 823575552583c29b3f38b61471a9614569af8003
Author: Gerrit Pape <pape@smarden.org>
Date:   Wed, 30 Jul 2014 13:44:35 +0000

  * sv.c: fix typo that may lead to wrong output from sv when reporting
    status of multiple service directories.

Thx Jamie Heilman, https://bugs.debian.org/715512:
> Given two service directories:
>
> # ls testapp1
> run  supervise
> # ls testapp2
> log  run  supervise
>
> where testapp1 is running, and testapp2 isn't:
>
> # sv status ./testapp1
> run: ./testapp1: (pid 3682) 408178s
> # sv status ./testapp2
> fail: ./testapp2: runsv not running
> # sv status ./testapp1 ./testapp2
> run: ./testapp1: (pid 3682) 408184s
> fail: ./testapp2: runsv not running
> run: ./testapp2: (pid 3682) 408184sfail: ./testapp2: runsv not running

Diffstat:
Mpackage/CHANGES | 2++
Msrc/sv.c | 2+-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/CHANGES b/package/CHANGES @@ -1,5 +1,7 @@ 2.1.2 + * sv.c: fix typo that may lead to wrong output from sv when reporting + status of multiple service directories. * doc/index.html: add deepOfix Mail Server to list of distributions that include runit (thx Debayan Banerjee). * doc/useinit.html: update description on how to use with upstart diff --git a/src/sv.c b/src/sv.c @@ -153,7 +153,7 @@ int status(char *unused) { int rc; rc =svstatus_get(); - switch(r) { case -1: if (lsb) done(4); case 0: return(0); } + switch(rc) { case -1: if (lsb) done(4); case 0: return(0); } rc =svstatus_print(*service); if (chdir("log") == -1) { if (errno != error_noent) {