Compare commits

...

2 Commits

Author SHA1 Message Date
48ee803e58
init: Avoid "No child processes" error spam
All checks were successful
Build and test / build (push) Successful in 1m41s
2024-12-14 12:19:13 +01:00
984200ca9a
loginui: Pledge unix 2024-12-14 12:18:59 +01:00
2 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,7 @@ Result<int> luna_main(int argc, char** argv)
return 1; return 1;
} }
TRY(os::Security::pledge("stdio rpath wpath proc exec id", nullptr)); TRY(os::Security::pledge("stdio rpath wpath unix proc exec id", nullptr));
setsid(); setsid();

View File

@ -324,6 +324,7 @@ static void wait_for_child(int)
auto rc = os::Process::wait(os::Process::ANY_CHILD, &status); auto rc = os::Process::wait(os::Process::ANY_CHILD, &status);
if (rc.has_error()) if (rc.has_error())
{ {
if (rc.error() == ECHILD) return;
do_log("[init] waitpid error %s", rc.error_string()); do_log("[init] waitpid error %s", rc.error_string());
return; return;
} }