diff options
Diffstat (limited to 'src/supervision/s6-svwait.c')
-rw-r--r-- | src/supervision/s6-svwait.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/supervision/s6-svwait.c b/src/supervision/s6-svwait.c index 3633bd1..2c7a312 100644 --- a/src/supervision/s6-svwait.c +++ b/src/supervision/s6-svwait.c @@ -51,7 +51,7 @@ int main (int argc, char const *const *argv) { s6_svlisten_t foo = S6_SVLISTEN_ZERO ; - int e ; + unsigned int e ; uint16_t ids[argc] ; unsigned char upstate[bitarray_div8(argc)] ; unsigned char readystate[bitarray_div8(argc)] ; @@ -61,12 +61,10 @@ int main (int argc, char const *const *argv) { wantup = 1 ; e = s6_svlisten_loop(&foo, 0, 0, 0, &deadline, -1, 0) ; - if (e < 0) strerr_dief1x(102, "supervisor died") ; - else if (e > 0) strerr_dief1x(e, "some services reported permanent failure") ; + if (e) strerr_dief1x(e, "some services reported permanent failure or their supervisor died") ; } e = s6_svlisten_loop(&foo, wantup, wantready, or, &deadline, -1, 0) ; - if (e < 0) strerr_dief1x(102, "supervisor died") ; - else if (e > 0) strerr_dief1x(e, "some services reported permanent failure") ; + if (e) strerr_dief1x(e, "some services reported permanent failure or their supervisor died") ; } return 0 ; } |