Selaa lähdekoodia

Kernel: Make the "entire executable" region shared

This makes Region::clone() do the right thing with it on fork().
Andreas Kling 5 vuotta sitten
vanhempi
commit
0acac186fb
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  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;