This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
problem with pthread and waitpid()
- To: libc-alpha at sources dot redhat dot com
- Subject: problem with pthread and waitpid()
- From: Britton <fsblk at aurora dot uaf dot edu>
- Date: Sat, 16 Sep 2000 21:37:25 -0800 (AKDT)
I have noticed a problem with the LinuxThreads implementation. When a
process forks and execs a program that spawns threads, then waitpids on
that child, the wait ends when the initial thread of the exec'd program
finishes, but before the spawned threads are necesarilly dead.
I know that threads used to just use SIGUSR1 and SIGUSR2 to coordinate,
nowadays they use different signals I think but it is the same basic
mechanism, correct? In which case the initial thread should handle
signals and kill and wait on it's spawned threads before dying, so that
consistent behavior can be shown to other programs which might be waiting
for resources held by threads. Or do initial thread processes/manager
processes (whichever handles fatal signals) need to use default actions
only if the default action is set, even when this leads to bad behavior
like the above?
Britton