Kernel: Fix wait syscall to report status of exited children

This commit is contained in:
2024-08-09 16:52:35 +03:00
parent b6c964c444
commit 1c67b5e812
5 changed files with 135 additions and 69 deletions

View File

@@ -147,7 +147,7 @@ BAN::Optional<BAN::String> parse_dollar(BAN::StringView command, size_t& i)
close(fds[0]);
int status;
if (waitpid(pid, &status, 0) == -1 && errno != ECHILD)
if (waitpid(pid, &status, 0) == -1)
ERROR_RETURN("waitpid", {});
while (!output.empty() && output.back() == '\n')