problem with pthread and waitpid()
Britton
fsblk@aurora.uaf.edu
Sat Sep 16 22:37:00 GMT 2000
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
More information about the Libc-alpha
mailing list