On 13/01/2026 8:31 pm, [email protected] wrote:
   cp /proc/30319/exe ./foo1
[...]
I once heard that story of someone rm -rf-ing /, then stopping in panic, but 
/bin/sh
was gone, then rescueing it this way. Or was it /lib/libc-whatever?

A similar workaround is recommended even in release notes:

<https://www.debian.org/releases/trixie/release-notes/upgrading.en.html>
4. Upgrades from Debian 12 (bookworm):
In case tmux was upgraded to a new major version you may get an error on
attach: “open terminal failed: not a terminal”. You can still access the
old session with:

/proc/$(pgrep "tmux: server")/exe attach

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.

Reply via email to