From 0acac186fbca57f0c7ded673826a9c0b087fb40a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 2 Mar 2020 06:12:27 +0100 Subject: [PATCH] Kernel: Make the "entire executable" region shared This makes Region::clone() do the right thing with it on fork(). --- Kernel/Process.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 85095c7ac96..fd3b0fc59a2 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -858,6 +858,8 @@ int Process::do_exec(NonnullRefPtr main_program_description, Ve ASSERT(region); + region->set_shared(true); + Region* master_tls_region { nullptr }; size_t master_tls_size = 0; size_t master_tls_alignment = 0;