On Sun, 17 Aug 2003, Steve Langasek wrote: > > One thing we should probably do is not dlclose() any shared extensions on > > shutdown. I am not sure if your list of bugs included any reports of > > crashes on shutdown, but if you ever come across one of those it is likely > > that removing the dlclose() will fix it. > > I don't recall ever seeing such a bug report. At least in the case of > library symbol conflicts, leaving the shared extension open after the > end of a request would have exactly the opposite effect, though.
I meant on server shutdown, not request shutdown. There are a couple of problems in this area. The most obvious affects C++ extensions that use any sort of function-scoped static objects. If you are using an older version of gcc/glibc that doesn't support per-shared-library atexit stacks or if you have compiled your extension without --cxa-atexit (or whatever that option is called) then at shutdown we unload the shared extension but the destructor for the function-scoped static object is sitting on the process atexit stack referring to an address in the now unloaded extension code. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php