tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dlopen() and libpthread

On Mon, Oct 22, 2012 at 08:40:27AM +0000, Emmanuel Dreyfus wrote:
> I also bet that Linux behavior must allow dlopen() of libpthread followed
> by a thread startup.

I confirm that: I crafted a test program that dlopen a DSO which calls
pthread_create, it works very well on Linux.

We cannot blame OpenSC and PCSC-lite for assuming this is possible. No
standard backs this limitation of our pthread implementation.

Rmoving the requirement for libpthread to be linked at startup time will
not be easy. linking with -lpthreead any program that can use dlopen seems
overkill. Let the administrator set LD_PRELOAD=/usr/lib/
seems an acceptable workaround.

We could have a generic way of setting envirnoement variables for setuid
binaries. What about something like /etc/suenv.d/$progname? 

Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index