about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2024-02-07 15:09:36 +0100
committerLeah Neukirchen <leah@vuxu.org>2024-02-07 15:09:36 +0100
commit5f98314624326955a22a168c7caf23d35979d8e1 (patch)
tree28b65422ef7934dcb62c95da4f2dda0fddc69c3f
parent90e0de5f150e27573096036b3ec253128d821ae3 (diff)
downloadnitro-5f98314624326955a22a168c7caf23d35979d8e1.tar.gz
nitro-5f98314624326955a22a168c7caf23d35979d8e1.tar.xz
nitro-5f98314624326955a22a168c7caf23d35979d8e1.zip
setup script exiting with status 111 means fatal
-rw-r--r--nitro.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nitro.c b/nitro.c
index 74c769c..6139cb9 100644
--- a/nitro.c
+++ b/nitro.c
@@ -1211,8 +1211,12 @@ has_died(pid_t pid, int status)
 
 			services[i].setuppid = 0;
 
-			if (status == 0) {
+			if (WEXITSTATUS(status) == 0) {
 				process_step(i, EVNT_SETUP);
+			} else if (WEXITSTATUS(status) == 111) {
+				services[i].state = PROC_FATAL;
+				services[i].wstatus = -1;
+				notify(i);
 			} else {
 				services[i].state = PROC_DELAY;
 				services[i].timeout = 1000;