Kernel: Deliver SIGCHLD on process exit and ignore it properly

This commit is contained in:
2024-06-03 17:58:24 +03:00
parent 201aee3119
commit 765ccfa18c
3 changed files with 32 additions and 3 deletions

View File

@@ -220,6 +220,11 @@ namespace Kernel
ASSERT(signal >= _SIGMIN);
ASSERT(signal <= _SIGMAX);
ASSERT(signal < 64);
vaddr_t handler = m_signal_handlers[signal];
if (handler == (vaddr_t)SIG_IGN)
return;
if (handler == (vaddr_t)SIG_DFL && (signal == SIGCHLD || signal == SIGURG))
return;
if (signal < 32)
m_signal_pending_mask[0] |= (uint32_t)1 << signal;
else