mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 07:18:51 +00:00
LibCore: Make Process::wait_for_termination return exit code
This commit is contained in:
parent
3468a83e45
commit
866609c682
Notes:
github-actions[bot]
2024-11-19 22:28:23 +00:00
Author: https://github.com/stasoid
Commit: 866609c682
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2377
Reviewed-by: https://github.com/ADKaster ✅
3 changed files with 8 additions and 9 deletions
|
@ -146,7 +146,7 @@ pid_t Process::pid() const
|
|||
return GetProcessId(m_handle);
|
||||
}
|
||||
|
||||
ErrorOr<bool> Process::wait_for_termination()
|
||||
ErrorOr<int> Process::wait_for_termination()
|
||||
{
|
||||
auto result = WaitForSingleObject(m_handle, INFINITE);
|
||||
if (result == WAIT_FAILED)
|
||||
|
@ -156,7 +156,7 @@ ErrorOr<bool> Process::wait_for_termination()
|
|||
if (!GetExitCodeProcess(m_handle, &exit_code))
|
||||
return Error::from_windows_error(GetLastError());
|
||||
|
||||
return !exit_code;
|
||||
return exit_code;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue