summaryrefslogtreecommitdiff
path: root/src/supervision/s6-svwait.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-20 20:34:12 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-20 20:34:12 +0000
commitbb9a68add4feef7c53ba3994256745ea99cffef8 (patch)
treedeac3ebb8326e97d8432a8a7cabab34e1e16bda8 /src/supervision/s6-svwait.c
parentb4518d79cc80e7ea0f4e53345ca29afa21e4f0f3 (diff)
downloads6-bb9a68add4feef7c53ba3994256745ea99cffef8.tar.xz
Implement permanent failure for services via ./finish exiting 125
Diffstat (limited to 'src/supervision/s6-svwait.c')
-rw-r--r--src/supervision/s6-svwait.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/supervision/s6-svwait.c b/src/supervision/s6-svwait.c
index 752da69..28d1c3d 100644
--- a/src/supervision/s6-svwait.c
+++ b/src/supervision/s6-svwait.c
@@ -46,10 +46,13 @@ int main (int argc, char const *const *argv)
{
s6_svlisten_t foo = S6_SVLISTEN_ZERO ;
+ int e ;
uint16_t ids[argc] ;
unsigned char upstate[bitarray_div8(argc)] ;
unsigned char readystate[bitarray_div8(argc)] ;
s6_svlisten_init(argc, argv, &foo, ids, upstate, readystate, &deadline) ;
- return s6_svlisten_loop(&foo, wantup, wantready, or, &deadline, -1, 0) ;
+ e = s6_svlisten_loop(&foo, wantup, wantready, or, &deadline, -1, 0) ;
+ if (e) strerr_dief1x(e, "some services reported permanent failure") ;
}
+ return 0 ;
}