Hi,
with the 3.0 Linux baseline being glibc-2.2.3, maybe it's time to
enable dlclose() again in osl_unloadModule()?
>From the atexit manpage:
"Since glibc 2.2.3, atexit() (and on_exit(3)) can be used within
a shared library to establish functions that are called when
the shared library is unloaded."
Cheers,
-- Thorsten
diff --git sal/osl/unx/module.c sal/osl/unx/module.c
index 874eb52..89d0869 100644
--- sal/osl/unx/module.c
+++ sal/osl/unx/module.c
@@ -150,12 +150,14 @@ void SAL_CALL osl_unloadModule(oslModule hModule)
if (hModule)
{
#ifndef NO_DL_FUNCTIONS
-#ifndef GCC
- /* gcc (2.9.1 (egcs), 295) registers atexit handlers for
+#ifndef OLD_GLIBC
+ /* gcc (starting with 2.9.1 (egcs), 295) registers atexit handlers
for
* static destructors which obviously cannot
* be called after dlclose. A compiler "feature". The workaround
for now
* is not to dlclose libraries. Since most of them are closed at
shutdown
- * this does not make that much a difference
+ * this does not make that much a difference.
+ * Since glibc 2.2.3 atexit handlers will be called on
+ * dlclose, when registered from within a shared lib
*/
int nRet = dlclose(hModule);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]