]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(pthread_start_thread_event): Initialize p_pid already here.
authorUlrich Drepper <drepper@redhat.com>
Tue, 23 Nov 1999 22:05:24 +0000 (22:05 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 23 Nov 1999 22:05:24 +0000 (22:05 +0000)
linuxthreads/manager.c

index 94b78a474e824553f7ec05c150c698c2405f6608..2096659693859c4c43ef4e88265ce848ad5da4ce 100644 (file)
@@ -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.  */