This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

problem with pthread and waitpid()



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]