summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-09-08 22:01:34 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-09-08 22:01:34 +0000
commitea30deb53f7abd18dfba55be0468e49b42b07261 (patch)
tree543a29f43919ab1fba336346b02c5892262e7d38 /src
parent405117d42e6222c20e066e67487e87da0d8cf271 (diff)
downloads6-ea30deb53f7abd18dfba55be0468e49b42b07261.tar.xz
Add specific exit to s6-svstat when service is unsupervised
Diffstat (limited to 'src')
-rw-r--r--src/supervision/s6-svstat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/supervision/s6-svstat.c b/src/supervision/s6-svstat.c
index bfe87a5..4a413af 100644
--- a/src/supervision/s6-svstat.c
+++ b/src/supervision/s6-svstat.c
@@ -43,6 +43,9 @@ int main (int argc, char const *const *argv)
if (!s6_svstatus_read(*argv, &status))
strerr_diefu2sys(111, "read status for ", *argv) ;
+ isup = s6_svc_ok(argv[0]) ;
+ if (isup < 0) strerr_diefu2sys(111, "check ", argv[0]) ;
+ if (!isup) strerr_diefu3x(1, "read status for ", argv[0], ": s6-supervise not running") ;
tain_now_g() ;
if (tain_future(&status.stamp)) tain_copynow(&status.stamp) ;