3 ms·
Are the Linux package manager binary updates (meaning the file updates themselves) transactional somehow? What happens to running processes? Presumably they nee
by schemescape 3y ago
Are the Linux package manager binary updates (meaning the file updates themselves) transactional somehow? What happens to running processes? Presumably they need to be restarted.
Just overwriting files does not seem sufficient, given my limited understanding…
- Doxin 3y agoOn linux a file that's open won't get deleted. It'll stay in memory. When you replace a file all it does is point the filename to the new file contents. Any program open will keep running. Any newly started program will run the new binaries. Of course this can give trouble with complex programs. Old executables seeing new config files, that sort of thing. But in general this doesn't seem to be a massive issue, and is fairly doable to work around by keeping critical files open all the time.
- schemescape 3y agoThanks! I’m surprised that doesn’t cause more issues (especially with unattended updates on servers), e.g. programs not getting restarted when an update to a library is made, or newly started programs loading incompatible (some combination of old and new) dependencies.
- Doxin 3y agoI mean any program code is gonna stay loaded, so that's not an issue. So you're basically only left with resource files potentially causing issues. Most programs won't re-load their configs without getting prompted so that's not a problem either. I feel like it's one of those things that just happens to cause surprisingly few issues and where they do happen it's either no biggie or gets fixed.