mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 23:57:25 +00:00
Kernel: Process destruction should destroy all child threads.
We were only destroying the main thread when a process died, leaving any secondary threads around. They couldn't run, but because they were still in the global thread list, strange things could happen since they had some now-stale pointers to their old process.
This commit is contained in:
@@ -12,7 +12,7 @@ Thread::Thread(Process& process)
|
||||
: m_process(process)
|
||||
, m_tid(process.m_next_tid++)
|
||||
{
|
||||
dbgprintf("Thread: New thread TID=%u in %s(%u)\n", m_tid, process.name().characters(), process.pid());
|
||||
dbgprintf("Thread{%p}: New thread TID=%u in %s(%u)\n", this, m_tid, process.name().characters(), process.pid());
|
||||
set_default_signal_dispositions();
|
||||
m_fpu_state = (FPUState*)kmalloc_aligned(sizeof(FPUState), 16);
|
||||
memset(&m_tss, 0, sizeof(m_tss));
|
||||
|
||||
Reference in New Issue
Block a user