Browse Source

Kernel: Make the "entire executable" region shared

This makes Region::clone() do the right thing with it on fork().
Andreas Kling 5 years ago
parent
commit
0acac186fb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Kernel/Process.cpp

+ 2 - 0
Kernel/Process.cpp

@@ -858,6 +858,8 @@ int Process::do_exec(NonnullRefPtr<FileDescription> 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;