Skip to content

Commit

Permalink
Kernel: Stop sending SIGCHLD to kernel parent processes
Browse files Browse the repository at this point in the history
Kernel processes cannot handle signals.
  • Loading branch information
IdanHo authored and awesomekling committed Feb 21, 2022
1 parent 5a770f2 commit 2c996cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Kernel/Process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ void Process::finalize()
{
// FIXME: PID/TID BUG
if (auto parent_thread = Thread::from_tid(ppid().value())) {
if ((parent_thread->m_signal_action_data[SIGCHLD].flags & SA_NOCLDWAIT) != SA_NOCLDWAIT)
if (parent_thread->process().is_user_process() && (parent_thread->m_signal_action_data[SIGCHLD].flags & SA_NOCLDWAIT) != SA_NOCLDWAIT)
parent_thread->send_signal(SIGCHLD, this);
}
}
Expand Down

0 comments on commit 2c996cb

Please sign in to comment.