Kernel: Sending a signal to yourself should block until dispatch.

By moving the sending (and receiving) thread into the BlockedSignal state,
we ensure that the thread doesn't continue executing until the signal
has been dispatched.
This commit is contained in:
Andreas Kling 2019-05-26 02:20:16 +02:00
parent 6ffcee9176
commit 0cac84d6bd
Notes: sideshowbarker 2024-07-19 13:56:34 +09:00

View file

@ -1232,7 +1232,7 @@ int Process::sys$kill(pid_t pid, int signal)
}
if (pid == m_pid) {
current->send_signal(signal, this);
Scheduler::yield();
current->block(Thread::State::BlockedSignal);
return 0;
}
InterruptDisabler disabler;