mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibCore: Return correct error code from Process::wait_for_termination
This commit is contained in:
parent
4cd1ef12d7
commit
a450d64ffa
Notes:
github-actions[bot]
2024-12-20 14:00:54 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/a450d64ffa9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2682
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue