Reinitialize dynamic/share library

Hi,

I am getting some problem in a dynamic/share library I am using with my code. Restarting my application solves the problem.

Could anyone please tell me any safe way to reinitialize kind of mechanism for dynamic loaded libraries with minimum code changes in my application?

Please let me know if anyone require any clarification.

Thanks,
Rishabh
If it's a problem with memory corruption, the only solution is either to fix the library or to kill and restart the program to let the OS clean up the address space. If the issue is very serious, you could write a daemon-like program that uses the library and keep the main parts of your code in a separate program. Then you just open a pipe to the daemon and make requests for data processing. If the daemon crashes, the main program can just restart it and proceed as normal, without losing any program state.
When Dynamic/Static loaded libs crash, it will crash the whole application. You have only two options, and the first one is safest

1. Go the helios 1st suggestion (fix the crash)
2. Go the helios 2nd suggestion (run a saperate process for lib)
Thanks helios and Santosh
Topic archived. No new replies allowed.