title: Using dlopen, how can I cope with changes to the library file I have loaded?
body: <p>I have a program written in C++ which uses dlopen to load a dynamic library (Linux, i386, .so).  When the library file is subsequently modified, my program tends to crash.  This is understandable, since presumably the file is simply mapped into memory.</p>
  
  <p>My question is: other than simply creating myself a copy of the file and dlopening that, is there way for me to load a shared object which is safe against subsequent modifications, or any way to recover from modifications to a shared object that I have loaded?</p>
  
  <p><strong>Clarification:</strong> The question is not "how can I install a new library without crashing the program", it is "if someone who I don't control is copying libraries around, is it possible for me to defend against that?"</p>