summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/Process.cpp7
-rw-r--r--Kernel/Process.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 3f93912f1a..edc448fb02 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -631,6 +631,8 @@ void Process::finalize()
dump_perfcore();
}
+ m_threads_for_coredump.clear();
+
if (m_alarm_timer)
TimerQueue::the().cancel_timer(m_alarm_timer.release_nonnull());
m_fds.clear();
@@ -695,6 +697,11 @@ void Process::die()
// slave owner, we have to allow the PTY pair to be torn down.
m_tty = nullptr;
+ for_each_thread([&](auto& thread) {
+ m_threads_for_coredump.append(&thread);
+ return IterationDecision::Continue;
+ });
+
kill_all_threads();
}
diff --git a/Kernel/Process.h b/Kernel/Process.h
index d504224ddd..fbc669bd2d 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -663,6 +663,8 @@ private:
Thread::WaitBlockCondition m_wait_block_condition;
HashMap<String, String> m_coredump_metadata;
+
+ Vector<RefPtr<Thread>> m_threads_for_coredump;
};
extern InlineLinkedList<Process>* g_processes;