mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user