Kernel: Only call Process::die()
once on terminating signal
Previously, when e.g. the `SIGABRT` signal was sent to a process, `Thread::dispatch_signal()` would invoke `Process::terminate_due_to_signal()` which would then `::die()`. The result `DispatchSignalResult::Terminate` is then returned to `Thread::check_dispatch_pending_signal()` which proceeds to invoke `Process::die()` a second time. Change the behavior of `::check_dispatch_pending_signal()` to no longer call `Process::die()` if it receives `::Terminate` as a signal handling result, since that indicates that the process was already terminated. This fixes #7289.
This commit is contained in:
parent
7ee73b3721
commit
5b03b62518
Notes:
sideshowbarker
2024-07-18 12:14:54 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/5b03b62518a Pull-request: https://github.com/SerenityOS/serenity/pull/8052 Issue: https://github.com/SerenityOS/serenity/issues/7289
1 changed files with 0 additions and 3 deletions
|
@ -468,9 +468,6 @@ void Thread::check_dispatch_pending_signal()
|
|||
case DispatchSignalResult::Yield:
|
||||
yield_while_not_holding_big_lock();
|
||||
break;
|
||||
case DispatchSignalResult::Terminate:
|
||||
process().die();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue