On 14/01/2026 2:28 pm, [email protected] wrote:
On Wed, Jan 14, 2026 at 09:29:47AM +0700, Max Nikulin wrote:

As to ETXTBSY, I am less sure concerning .so plugins loaded using dlopen. At
least I saw crashes when cp(1) was used instead of install(1) to replace old
libraries during installing another version.

I don't know what you mean by ".so plugins", but if it is good ol' shared
libs, yes, they are mmapped:

I mean explicit call of dlopen(3). Consider e.g. apache modules. I mentioned it for the case if there is some difference in loading of linked libraries and loading optional parts later. Certainly files are mmap'ed. I have no idea if something has been changed in kernel or in libdl during last decade, but earlier cp was able to overwrite shared library in place causing crash on next attempt to call some function from that library. I have not retested it now. I think, the key point is whether kernel considers specific file as being executed. Memory mapped files may be opened in read-write mode.

Reply via email to