mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibCore: Return correct error code from Process::wait_for_termination
This commit is contained in:
parent
4cd1ef12d7
commit
a450d64ffa
|
|
@ -346,7 +346,7 @@ ErrorOr<int> Process::wait_for_termination()
|
|||
int exit_code = -1;
|
||||
int status;
|
||||
if (waitpid(m_pid, &status, 0) == -1)
|
||||
return Error::from_syscall("waitpid"sv, errno);
|
||||
return Error::from_syscall("waitpid"sv, -errno);
|
||||
|
||||
if (WIFEXITED(status)) {
|
||||
exit_code = WEXITSTATUS(status);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user