Is such a think possible under Linux?
Yeah I know I can tmux / nohup, and I know that if I dig deep enough I can manually reattach some of the file descriptors under /proc to get a working terminal for that process again…
… but is there a tool that automatically does this somehow?
e.g.
run -d ./bash long-running.sh > proc.file
### later
run -a proc.file
Edit: Y’all really know how to recreate the feeling of StackOverflow circa 2018


I googled it for you and found this: https://serverfault.com/questions/24425/can-i-nohup-screen-an-already-started-process
It doesn’t create a file, but you don’t need one. Read all the answers for options on reattaching. I haven’t used it, so I can’t vouch for any of them. (Personally I just use byobu and have it start with each shell, so I’m always running tmux.)
I don’t think there’s any system that can reliably freeze a single process to disk. Usually that’s implemented by the program itself.
Cryopid seems promising from that, thanks!