5 ms·
> You can't go and change a program's binary data while it is running without blowing stuff up. Linux has zero problems with you overwriting a binary (by unlin
by Denvercoder9 5y ago
> You can't go and change a program's binary data while it is running without blowing stuff up.
Linux has zero problems with you overwriting a binary (by unlinking and replacing it) while it's in use. Sure, the old version will keep running, but it doesn't prevent the update, and you'll get the new version when you restart it.
- Someone 5y agoIf you have to update multiple files (say the main executable and a few shared libraries that it may only load when it needs them), you’ll need a transactional file system. Even then there’s still downtime when you restart the executable (could be seconds, but also minutes). Preventing that is possible, too (even on a single machine), but the cost often doesn’t make it worth it. And nitpick: I think you know it, but for others: “unlinking and replacing” is essential. “Overwriting” (keeping the inode number the same) can be problematic.
- teddyh 5y ago> “unlinking and replacing” is essential. “Overwriting” (keeping the inode number the same) can be problematic. Yes, that is why /usr/bin/install exists.