mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 17:37:35 +00:00
Kernel: Unblock tracer process in Process:unblock_waiters()
Since the tracer process may not be our parent process, we need to explicitly unblock it (instead of the parent) if we are being traced.
This commit is contained in:
parent
bb1ad759c5
commit
9aa6dd6b78
1 changed files with 8 additions and 2 deletions
|
@ -661,8 +661,14 @@ void Process::disowned_by_waiter(Process& process)
|
||||||
|
|
||||||
void Process::unblock_waiters(Thread::WaitBlocker::UnblockFlags flags, u8 signal)
|
void Process::unblock_waiters(Thread::WaitBlocker::UnblockFlags flags, u8 signal)
|
||||||
{
|
{
|
||||||
if (auto parent = Process::from_pid(ppid()))
|
RefPtr<Process> waiter_process;
|
||||||
parent->m_wait_blocker_set.unblock(*this, flags, signal);
|
if (auto* my_tracer = tracer())
|
||||||
|
waiter_process = Process::from_pid(my_tracer->tracer_pid());
|
||||||
|
else
|
||||||
|
waiter_process = Process::from_pid(ppid());
|
||||||
|
|
||||||
|
if (waiter_process)
|
||||||
|
waiter_process->m_wait_blocker_set.unblock(*this, flags, signal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Process::die()
|
void Process::die()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue