Shared libraries
Shared libraries
Posted Nov 25, 2025 6:53 UTC (Tue) by josh (subscriber, #17465)In reply to: Shared libraries by Cyberax
Parent article: APT Rust requirement raises questions
> But how do you make sure that a "Component A" works if the "Library B" was replaced while "Component A" is running?
Whether you're dealing with a replacement of component A, or a replacement of library B, either way, you *always* write to a temporary file and rename over the original, so that the old inode still exists as the source of the mmap'd code, and then restart A. Writing over the original will cause segfaults.
