summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-02-12 23:43:46 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-02-12 23:43:46 +0100
commitee94145132953271fb3fd606d00154442689e7ec (patch)
tree08049cfb608024d8833d63551c03a252210c3194
parent2dc44849fd8ca9447adc34bd5b86c4c88b267527 (diff)
downloadrvnit-ee94145132953271fb3fd606d00154442689e7ec.tar.gz
rvnit-ee94145132953271fb3fd606d00154442689e7ec.tar.xz
rvnit-ee94145132953271fb3fd606d00154442689e7ec.zip
pause when having no children during uptime
-rw-r--r--rvnit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/rvnit.c b/rvnit.c
index f7b0a33..2a054bd 100644
--- a/rvnit.c
+++ b/rvnit.c
@@ -968,8 +968,11 @@ cont1:
 		int pid = timedwait(&status, -1);
 
 		if (pid < 0) {
-			if (errno == ECHILD)
-				break;
+			if (errno == ECHILD) {
+				/* init has no active children, keep system up
+				   nevertheless, wait for SIGCONT */
+				pause();
+			}
 			if (errno == EINTR)
 				continue;
 		}