diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-25 11:25:15 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-25 11:25:15 +0000 |
commit | 9a669c4b3973118dfcce2a2b1fb4babd0aaa6af7 (patch) | |
tree | 50298ce1f6a60a19f8b7ff7a594ac8f4fc5d4d67 /src/supervision/s6-supervise.c | |
parent | 2654165a84b90af2cbfef967e6e230b2975b644c (diff) | |
download | s6-9a669c4b3973118dfcce2a2b1fb4babd0aaa6af7.tar.xz |
Stop using flagwant; new s6-svstat API; s6-svwait's timeout exitcode is now 99
Diffstat (limited to 'src/supervision/s6-supervise.c')
-rw-r--r-- | src/supervision/s6-supervise.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/supervision/s6-supervise.c b/src/supervision/s6-supervise.c index 2e8ce6a..a1a52f8 100644 --- a/src/supervision/s6-supervise.c +++ b/src/supervision/s6-supervise.c @@ -297,13 +297,13 @@ static void trystart (void) static void downtimeout (void) { - if (status.flagwant && status.flagwantup) trystart() ; + if (status.flagwantup) trystart() ; else settimeout_infinite() ; } static void down_O (void) { - status.flagwant = 0 ; + status.flagwantup = 0 ; announce() ; } @@ -315,7 +315,6 @@ static void down_o (void) static void down_u (void) { - status.flagwant = 1 ; status.flagwantup = 1 ; announce() ; trystart() ; @@ -323,7 +322,6 @@ static void down_u (void) static void down_d (void) { - status.flagwant = 1 ; status.flagwantup = 0 ; announce() ; } @@ -391,13 +389,12 @@ static void uptimeout (void) static void up_o (void) { - status.flagwant = 0 ; + status.flagwantup = 0 ; announce() ; } static void up_d (void) { - status.flagwant = 1 ; status.flagwantup = 0 ; killt() ; killc() ; @@ -405,7 +402,6 @@ static void up_d (void) static void up_u (void) { - status.flagwant = 1 ; status.flagwantup = 1 ; announce() ; } @@ -439,7 +435,7 @@ static void finish_z (void) int wstat = (int)status.pid ; if (WIFEXITED(wstat) && WEXITSTATUS(wstat) == 125) { - status.flagwant = 0 ; + status.flagwantup = 0 ; set_down_and_ready("OD", 2) ; } else set_down_and_ready("D", 1) ; @@ -447,7 +443,6 @@ static void finish_z (void) static void finish_u (void) { - status.flagwant = 1 ; status.flagwantup = 1 ; announce() ; } |