summaryrefslogtreecommitdiff
path: root/Kernel/Process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r--Kernel/Process.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 1b53fc2e7d..3d58a58278 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -661,8 +661,14 @@ void Process::disowned_by_waiter(Process& process)
void Process::unblock_waiters(Thread::WaitBlocker::UnblockFlags flags, u8 signal)
{
- if (auto parent = Process::from_pid(ppid()))
- parent->m_wait_blocker_set.unblock(*this, flags, signal);
+ RefPtr<Process> waiter_process;
+ 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()