mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
LibCore: Return correct error code from Process::wait_for_termination
This commit is contained in:
committed by
Jelle Raaijmakers
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);
|
||||
|
||||
Reference in New Issue
Block a user