Randall R Schulz wrote:
My understanding is that if the update is overwriting the library in use you would see the process core dump, because the file is memory mapped to the process.
That doesn't happen. I can update the library without the process noticing at all.
That's because the software development tools don't overwrite existing files. They move / rename or delete those files and create new ones. This prevents failure of either the tools or the programs using them.
That sounds like a nice explanation, but "scp" does it differently for libraries and executables. If I scp a library, the library is just replaced, if I scp an executable I get "text file is busy". Also - would you call scp a "software development tool" ? :-) (I use scp to copy the libraries from a development system to the target system).
You might want to look into "fam" the File Alteration Monitor, which now has kernel support and has low overhead compared to earlier, user-based implementations.
That's what I mentioned earlier - the code is already using inotify(), so adding another one is no big deal. Then I could just trigger an execv(myself) off that. But that still leaves the question of - which file to monitor without hardcoding the name? Is there some library equivalent of "ldd" that I could call from within my code? /Per Jessen, Zürich