summaryrefslogtreecommitdiff
path: root/src/supervision/s6-supervise.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-supervise.c
parentb4518d79cc80e7ea0f4e53345ca29afa21e4f0f3 (diff)
downloads6-bb9a68add4feef7c53ba3994256745ea99cffef8.tar.xz
Implement permanent failure for services via ./finish exiting 125
Diffstat (limited to 'src/supervision/s6-supervise.c')
-rw-r--r--src/supervision/s6-supervise.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/supervision/s6-supervise.c b/src/supervision/s6-supervise.c
index 8bb55c8..2e8ce6a 100644
--- a/src/supervision/s6-supervise.c
+++ b/src/supervision/s6-supervise.c
@@ -436,7 +436,13 @@ static void finishtimeout (void)
static void finish_z (void)
{
- set_down_and_ready("D", 1) ;
+ int wstat = (int)status.pid ;
+ if (WIFEXITED(wstat) && WEXITSTATUS(wstat) == 125)
+ {
+ status.flagwant = 0 ;
+ set_down_and_ready("OD", 2) ;
+ }
+ else set_down_and_ready("D", 1) ;
}
static void finish_u (void)