Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Commit

Permalink
Fix signal delivery...
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed May 23, 2021
1 parent fddd9d7 commit 819606f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/sys/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ int send_signal(pid_t process, int signal, int force_root) {
if (!(receiver->flags & PROC_FLAG_SUSPENDED)) {
return -EINVAL;
} else {
__sync_and_and_fetch(&this_core->current_process->flags, ~(PROC_FLAG_SUSPENDED));
__sync_and_and_fetch(&receiver->flags, ~(PROC_FLAG_SUSPENDED));
receiver->status = 0;
}
}
Expand All @@ -223,7 +223,7 @@ int send_signal(pid_t process, int signal, int force_root) {
} else {
spin_unlock(receiver->sched_lock);
}
if (!process_is_ready(receiver) && !(receiver->flags & PROC_FLAG_RUNNING)) {
if (!process_is_ready(receiver) || receiver == this_core->current_process) {
make_process_ready(receiver);
}

Expand Down

0 comments on commit 819606f

Please sign in to comment.