init: Fix infinite wait loop
All checks were successful
Build and test / build (push) Successful in 1m51s

Since waitpid always sends a SIGCHLD now, we'd handle a SIGCHLD after returning from waitpid, which would trigger another wait, looping forever and not actually handling the wait.
This commit is contained in:
apio 2024-12-11 19:13:12 +01:00
parent d05d6fad0b
commit ec6ceb4c8d
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -426,8 +426,6 @@ Result<int> luna_main(int argc, char** argv)
"change the default service path (/etc/init or /etc/user)"); "change the default service path (/etc/init or /etc/user)");
parser.parse(argc, argv); parser.parse(argc, argv);
signal(SIGCHLD, wait_for_child);
if (user) return user_init(service_path); if (user) return user_init(service_path);
return sysinit(service_path); return sysinit(service_path);
} }