Skip to content

Commit

Permalink
Kernel: Sending a signal to yourself should block until dispatch.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
awesomekling committed May 26, 2019
1 parent 6ffcee9 commit 0cac84d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Kernel/Process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0cac84d

Please sign in to comment.