mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-05 04:06:08 +00:00
Kernel: Ignore signals sent to threadless (zombie) processes
If a process doesn't have any threads left, it's in a zombie state and we can't meaningfully send signals to it. So just ignore them. Fixes #1313.
This commit is contained in:
@@ -3719,6 +3719,8 @@ void Process::terminate_due_to_signal(u8 signal)
|
||||
void Process::send_signal(u8 signal, Process* sender)
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
if (!m_thread_count)
|
||||
return;
|
||||
auto* thread = Thread::from_tid(m_pid);
|
||||
if (!thread)
|
||||
thread = &any_thread();
|
||||
|
||||
Reference in New Issue
Block a user