kernel: Do not allow sending signals to dying threads
This was causing a kernel panic when closing the terminal by directly exiting the shell (either EOF or the exit command)
This commit is contained in:
parent
36fad85396
commit
441e04076a
@ -207,6 +207,7 @@ bool Thread::will_ignore_pending_signal()
|
|||||||
void Thread::send_signal(int signo)
|
void Thread::send_signal(int signo)
|
||||||
{
|
{
|
||||||
if (is_kernel) return;
|
if (is_kernel) return;
|
||||||
|
if (state == ThreadState::Exited || state == ThreadState::Dying) return;
|
||||||
|
|
||||||
check(signo > 0 && signo <= NSIG);
|
check(signo > 0 && signo <= NSIG);
|
||||||
pending_signals.set(signo - 1, true);
|
pending_signals.set(signo - 1, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user