[PATCH 1/4] supervise: Fix arguments to finish

From: Olivier Brunel <jjk_at_jjacky.com>
Date: Sun, 18 Jan 2015 21:13:55 +0100

The first argument is the return code unless signaled, but then it
should be 256 as 255 is a valid return code.

Signed-off-by: Olivier Brunel <jjk_at_jjacky.com>
---
 src/supervision/s6-supervise.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/supervision/s6-supervise.c b/src/supervision/s6-supervise.c
index 65cbd9d..1ea45d0 100644
--- a/src/supervision/s6-supervise.c
+++ b/src/supervision/s6-supervise.c
_at_@ -248,7 +248,7 @@ static void tryfinish (int wstat, int islast)
     char fmt1[UINT_FMT] ;
     char *cargv[4] = { "finish", fmt0, fmt1, 0 } ;
     selfpipe_finish() ;
-    fmt0[uint_fmt(fmt0, WIFSIGNALED(wstat) ? 255 : WEXITSTATUS(wstat))] = 0 ;
+    fmt0[uint_fmt(fmt0, WIFSIGNALED(wstat) ? 256 : WEXITSTATUS(wstat))] = 0 ;
     fmt1[uint_fmt(fmt1, WTERMSIG(wstat))] = 0 ;
     if (flagsetsid) setsid() ;
     execve("./finish", cargv, (char *const *)environ) ;
-- 
2.2.2
Received on Sun Jan 18 2015 - 20:13:55 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC