Hi Paul, I finally found time to look at the problem. And I hit a problem with RTLD_LOCAL. Exceptions do not work with gcc always as expected, when a library is loaded with RTLD_LOCAL. The description is here: http://gcc.gnu.org/faq.html#dso.
I hit the problem in conjunction with my tntdb library, which uses the dlopen-wrapper from cxxtools as well to load database drivers. If the driver is loaded with RTLD_LOCAL, the exception type is not determined correctly. I have a application which tries to catch a exception of type tntdb::NotFound. But it is not catched but passed on to tntnet, where the exception is catched as a plain std::exception. So it looks like I need different flags when a library is dlopened from a web application. There are 2 possible solutions and I don't know exactly, which is the best. Either I use RTLD_GLOBAL in cxxtools and do not use the wrapper in tntnet but use dlopen with RTLD_LOCAL or I use RTLD_LOCAL in cxxtools and use dlopen with RTLD_GLOBAL in tntdb. I feel, that RTLD_GLOBAL is a good default, so I need to change tntnet. It looks like RTLD_GLOBAL is, what is normally expected. If 2 classes has the same name (and namespace), they should be the same class. Tntnet has the special exception, that the libraries are not libraries in the common sense, but are actually applications, which should be more isolated than libraries. What do you think? I hope my explanation was good enough. Tommi ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
