> 
> The "!" solution may work well for those who are developing applications
> with cxxtools, but in our case it is tntnet that is loading our web
> application using the cxx_dlopen() function, which in turn uses
> RTLD_GLOBAL, therefore we will need a method of telling tntnet to load
> the web application with RTLD_LOCAL instead of with RTLD_GLOBAL. It
> seems to me that the best place to do so will be in the tntnet.conf file
> using whatever method you think is best.
> 
> Thanks for looking into this!
> 
> Robert
> 
Thank you for your feedback. Looks like we are very near to a final solution.

I think I have fully understood your problem and also I feel, that my 
suggestion will fully meet your needs. If we add some "!myLib" into cxxtools 
loading mechanism (or tntnet, since I moved this dlopen into tntnet) it is 
easy to add that in tntnet.conf. Just change your mappings like this:
Instead of e.g.:
        MapUrl   ^/(.*)$        $...@mylib

you just have to add this ! to the library name:
        MapUrl   ^/(.*)$        $...@!mylib

So users will be able to choose even per library, which loading mechanism to 
use. Tntnet has already this catch(...)-case.

Also I agree with you, that webapplications should really catch their 
exceptions themself. Good applications will do that. Still I feel, that the 
default case should be, that tntnet reports the correct error message from 
std::exception::what().

I have implemented this change here already but not yet checked in. For my 
suprise tntnet is able to catch a exception in both cases. Look like gcc (or 
glibc - I don't know, who is responsible for this) have fixed that bug.

Tommi

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to