On Mon, Jul 02, 2007 at 10:15:12AM -0300, Davi Arnaut wrote: > apr_posixsem_is_global was just an example, there are many > incompatibilities between LinuxThreads and NPTL (process shared > resources, fork()/wait() on the child, thread termination on execve(), etc. > > What I want is to let the developer enforce that the build of APR he is > distributing is only guaranteed to work linked with NPTL -- given that > on almost any 2.6 distro the user may switch the pthread implementation > using LD_ASSUME_KERNEL.
I'm not entirely comfortable with putting this kind of thing in APR. APR *must* be able to presume that the run-time environment is equally capable as the build environment - otherwise there is little point in having a configure script at all. Having APR attempt to verify the capabilities of the run-time environment seems like a long road to start down. Where the NPTL features are actually exposed by the APR API - and note that things like execve() behaviour in threaded apps are not - it must already be the case that the relevant APIs will fail gracefully if the user chooses to cripple the run-time environment. Regards, joe
