瀏覽代碼

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.
Jelle Raaijmakers 4 年之前
父節點
當前提交
5b03b62518
共有 1 個文件被更改,包括 0 次插入3 次删除
  1. 0 3
      Kernel/Thread.cpp

+ 0 - 3
Kernel/Thread.cpp

@@ -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;
     }