Can it be assumed that calling apr_dso_load() twice for the same shared
object, will not re-open that file, but just returns the same handle?
I know that under dlopen platforms (most of the UNIXes), it is true.
If it isn't true under other platforms, then it may help to manage a
list of the files that were loaded (e.g. in win32/dso.c), and before
loading a shared object, to search for it there, and if it is there,
return the original handle rather than re-loading it.
I thing that double load of a shared object may cause crashes and other
strange behaviors.
If you can check the functionality of double call to apr_dso_load()
under win32, DSO_USE_SHL platforms, etc., then please check it. You may
use something like the following program:
#include <dlfcn.h>
main() {
printf("%d\n", dlopen("/lib/libz.so.1", RTLD_NOW|RTLD_GLOBAL));
printf("%d\n", dlopen("/lib/libz.so.1", RTLD_NOW|RTLD_GLOBAL));
}
Of course, you should put a shared object that you have in your system,
and replace the dlopen by the appropriate function (e.g. shl_load).
If there is an environment where the returned values are different,
then this platform needs the patch I mentioned above.
And if the conclusion is that such a patch is needed, then I'm willing
to do it.
--
Eli Marmor
[EMAIL PROTECTED]
CTO, Founder
Netmask (El-Mar) Internet Technologies Ltd.
__________________________________________________________
Tel.: +972-9-766-1020 8 Yad-Harutzim St.
Fax.: +972-9-766-1314 P.O.B. 7004
Mobile: +972-50-23-7338 Kfar-Saba 44641, Israel