From fe3d65781ce30a1f1d52c0bfb21c1a7cc5c8e3b8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 23 Nov 1999 22:05:24 +0000 Subject: [PATCH] (pthread_start_thread_event): Initialize p_pid already here. --- linuxthreads/manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c index 94b78a474e8..20966596938 100644 --- a/linuxthreads/manager.c +++ b/linuxthreads/manager.c @@ -252,6 +252,9 @@ static int pthread_start_thread_event(void *arg) #ifdef INIT_THREAD_SELF INIT_THREAD_SELF(self, self->p_nr); #endif + /* Make sure our pid field is initialized, just in case we get there + before our father has initialized it. */ + THREAD_SETMEM(self, p_pid, __getpid()); /* Get the lock the manager will free once all is correctly set up. */ __pthread_lock (THREAD_GETMEM(self, p_lock), NULL); /* Free it immediately. */ -- 2.47.2