Kernel: Don't crash when terminating process with signal

This commit is contained in:
Bananymous 2025-06-01 16:59:02 +03:00
parent 2b48933f29
commit b2e3aefa72
1 changed files with 3 additions and 0 deletions

View File

@ -623,6 +623,9 @@ namespace Kernel
{
Processor::set_interrupt_state(InterruptState::Disabled);
setup_process_cleanup();
// This is super hacky but prevents a crash in yield :D
if (m_signal_lock.current_processor_has_lock())
m_signal_lock.unlock(InterruptState::Disabled);
Processor::yield();
ASSERT_NOT_REACHED();
}