[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: pthread_atfork is "hidden" -- bug or feature?



Paul Pluzhnikov wrote:

> On Phoebe (nptl-20021219.tar.bz2) pthread_atfork is hidden:
> 
> $ objdump -T /lib/i686/libpthread.so.0 | grep pthread_atfork
> 000067a0 g    DF .text  00000046 (GLIBC_2.0)  pthread_atfork

Correct.


> This is visible at the user level as the test case below demonstrates.
> Is this a bug or a feature?

pthread_atfork is in libpthread_nonshared.a and is linked to the object
which is linked with libpthread.  This is necessary to guarantee that
the function can do all it has to.  If you use something completely
undefined as using RTLD_NEXT on there functions you lose.  You cannot
make assumptions about the implementation.  For what it's worth, we
could even teach to compiler to inline that function if it would be useful.

-- 
--------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]