about summary refs log tree commit diff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-11-23 22:05:48 +0000
committerUlrich Drepper <drepper@redhat.com>1999-11-23 22:05:48 +0000
commitffd3563225a075469d49390f33a0fbc8037348ea (patch)
tree17e18149d76a2467584b4ff6baf2be14cd448fda /linuxthreads
parent70cafe50407015324db5ad3105955dbbb2172107 (diff)
downloadglibc-ffd3563225a075469d49390f33a0fbc8037348ea.tar.gz
glibc-ffd3563225a075469d49390f33a0fbc8037348ea.tar.xz
glibc-ffd3563225a075469d49390f33a0fbc8037348ea.zip
Update.
1999-11-23  Ulrich Drepper  <drepper@cygnus.com>

	* manager.c (pthread_start_thread_event): Initialize p_pid already
	here.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog5
-rw-r--r--linuxthreads/manager.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 9e258849cb..22ed03da77 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,8 @@
+1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
+
+	* manager.c (pthread_start_thread_event): Initialize p_pid already
+	here.
+
 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
 
 	* internals.h: Add prototype for __pthread_manager_event.
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index 0168b8a11c..6fced74ce7 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.  */