LibCore: Mark Process::wait_for_termination as const

After removal of the of the disown mechanism this can be marked as
const, which in my opinion makes sense for this API.
This commit is contained in:
Undefine 2025-08-13 16:17:05 +02:00 committed by Jelle Raaijmakers
parent 769bbe6021
commit 6fa705c730
Notes: github-actions[bot] 2025-11-07 10:29:12 +00:00
3 changed files with 3 additions and 3 deletions

View file

@ -283,7 +283,7 @@ pid_t Process::pid() const
return m_pid;
}
ErrorOr<int> Process::wait_for_termination()
ErrorOr<int> Process::wait_for_termination() const
{
VERIFY(m_pid > 0);

View file

@ -67,7 +67,7 @@ public:
pid_t pid() const;
ErrorOr<int> wait_for_termination();
ErrorOr<int> wait_for_termination() const;
private:
#ifndef AK_OS_WINDOWS

View file

@ -137,7 +137,7 @@ pid_t Process::pid() const
return GetProcessId(m_handle);
}
ErrorOr<int> Process::wait_for_termination()
ErrorOr<int> Process::wait_for_termination() const
{
auto result = WaitForSingleObject(m_handle, INFINITE);
if (result == WAIT_FAILED)