aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init/init.c3
-rw-r--r--init/log.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/init/init.c b/init/init.c
index fa0e32f..e82a504 100644
--- a/init/init.c
+++ b/init/init.c
@@ -110,6 +110,9 @@ int main(void)
if(subsystem_handle_term(process) > 0)
print(LOG_WARNING "init: failed to reap process %d",
process);
+ if(siginfo.si_status != 0) {
+ panic("init: process %d exited with non-zero status (%d)", siginfo.si_status);
+ }
}
}
diff --git a/init/log.c b/init/log.c
index 4fe748e..a3d0a7a 100644
--- a/init/log.c
+++ b/init/log.c
@@ -185,7 +185,7 @@ void _panic(const char *fileorigin,
if(pid != mainpid && mode == PANICMODE_RESPAWN) {
/* we want to let the main process handle the rest */
subsystem_change_mode(pid, mode);
- syscall(SYS_exit_group, 1);
+ syscall(SYS_exit_group, 0);
}
}