diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-07-08 03:40:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-07-08 03:40:49 +0000 |
commit | db54f488ee24b14027c485e0005950dfdd5ef885 (patch) | |
tree | 2a07a1746c1ffa758a34484f65263c737818d162 /nptl/sysdeps/unix/sysv/linux/fork.c | |
parent | 5fee5ad11c5307141f76aa7ea28ec1e1b6418fea (diff) | |
download | glibc-db54f488ee24b14027c485e0005950dfdd5ef885.tar.gz glibc-db54f488ee24b14027c485e0005950dfdd5ef885.tar.xz glibc-db54f488ee24b14027c485e0005950dfdd5ef885.zip |
Update.
2003-07-07 Ulrich Drepper <drepper@redhat.com> * descr.h (struct pthread): Add pid field. * allocatestack.c (allocate_stack): Initialize pid field in descriptor. (__reclaim_stacks): Likewise. * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined also check for PID of the signal source. (__pthread_initialize_minimal_internal): Also initialize pid field of initial thread's descriptor. * pthread_cancel.c: Use tgkill instead of tkill if possible. * sysdeps/unix/sysv/linux/fork.c: Likewise. * sysdeps/unix/sysv/linux/pt-raise.c: Likewise. * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise. * sysdeps/unix/sysv/linux/raise.c: Likewise.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/fork.c')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/fork.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/fork.c b/nptl/sysdeps/unix/sysv/linux/fork.c index 8bca6b4ab3..43e1b43e2b 100644 --- a/nptl/sysdeps/unix/sysv/linux/fork.c +++ b/nptl/sysdeps/unix/sysv/linux/fork.c @@ -134,6 +134,9 @@ __libc_fork (void) if (__fork_generation_pointer != NULL) *__fork_generation_pointer += 4; + /* Adjust the PID field for the new process. */ + self->pid = self->tid; + #if HP_TIMING_AVAIL /* The CPU clock of the thread and process have to be set to zero. */ hp_timing_t now; |