From ee94145132953271fb3fd606d00154442689e7ec Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 12 Feb 2022 23:43:46 +0100 Subject: pause when having no children during uptime --- rvnit.c | 7 +++++-- 1 file 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; } -- cgit 1.4.1