Pārlūkot izejas kodu

LibC: Make the getpid() cache process global (instead of thread-local)

Every thread in the process will have the same PID, after all.
Andreas Kling 5 gadi atpakaļ
vecāks
revīzija
b9a0ba9624
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      Libraries/LibC/unistd.cpp

+ 1 - 1
Libraries/LibC/unistd.cpp

@@ -47,7 +47,7 @@
 extern "C" {
 
 static __thread int s_cached_tid = 0;
-static __thread int s_cached_pid = 0;
+static int s_cached_pid = 0;
 
 int chown(const char* pathname, uid_t uid, gid_t gid)
 {