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]

: libc/1943: libpthread.so and libdl.so are problematic when a shared library is linked against both of them


Thank you (Andreas Jaeger and Ulrich Drepper) for
responding so quickly to my problem.

Andreas Jaeger <aj@suse.de> wrote:
> Since main uses pthreads, it has to be linked
> with -lpthread

Ulrich Drepper <drepper@redhat.com> wrote:
> DSOs cannot be the only components using pthread.

Well, even if I move all calls to a pthread function
to libx.so, still the same problem occurs (manager
thread dies); in fact this was the case in my original
example, but the I removed all calls to libpthread.so
from libx.so to make it extremely trivial. But linking
main.o explicitely with -lpthread solves the problem in
both cases (whether main.c calls functions from
libpthread.so directly or only via functions from
libx.so).

Still I have some problems in understanding this.
What is so special about libpthread.so (and libdsl.so)?
Why does it happen only when the shared library is
linked against both libpthread.so and libdl.so and the
program tries to fork() and exec()ute another program?Should I have known this or is this a something for
the manual? I don't mean that someone should make a
complete discussion of this issue here. I'm just
concerned about avoiding problems of this kind in the
future.

Best regards
Tobias

-----------------------------------------------------------------
Get free personalized email from Lycos at http://de.lycosmail.com

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