Fix raising signal from current thread outside of signal handler

This commit is contained in:
K. Lange 2018-10-05 22:20:40 +09:00
parent 2d26e2f490
commit 897d11ed3b

@ -228,7 +228,11 @@ int send_signal(pid_t process, uint32_t signal, int force_root) {
if (receiver == current_process) {
/* Forces us to be rescheduled and enter signal handler */
switch_next();
if (receiver->signal_kstack) {
switch_next();
} else {
switch_task(0);
}
}
return 0;