소스 검색

Kernel: Make the "entire executable" region shared

This makes Region::clone() do the right thing with it on fork().
Andreas Kling 5 년 전
부모
커밋
0acac186fb
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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;