Hacker News new | ask | show | jobs
by tptacek 5041 days ago
If you really need to demand-load and demand-unload lots and lots and lots of plugins --- and that's the only design I can think of where dlclose matters, but maybe there are others --- fork a plugin host process from the main process, and kill it off when you're done with the plugins. You can use anonymous shared memory to communicate between the two processes (since there's a simple parent/child relationship).