From 4d4d5e1c07da691d44915dc2457f43de70dc6da4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 17 Jan 2020 16:07:20 +0100 Subject: [PATCH] Kernel: Drop futex queues/state on exec() This state is not meaningful to the new process image so just drop it. --- Kernel/Process.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 0427792123..c4a6ffaeba 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -820,6 +820,8 @@ int Process::do_exec(NonnullRefPtr main_program_description, Ve current->m_signal_mask = 0; current->m_pending_signals = 0; + m_futex_queues.clear(); + for (int i = 0; i < m_fds.size(); ++i) { auto& daf = m_fds[i]; if (daf.description && daf.flags & FD_CLOEXEC) {