From b9a0ba96240ed4bf4b013757308f82770531fcd2 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 27 Jul 2020 18:05:48 +0200 Subject: [PATCH] LibC: Make the getpid() cache process global (instead of thread-local) Every thread in the process will have the same PID, after all. --- Libraries/LibC/unistd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibC/unistd.cpp b/Libraries/LibC/unistd.cpp index feee5faaea..76c0427031 100644 --- a/Libraries/LibC/unistd.cpp +++ b/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) {