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

  • tetris11@feddit.ukOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 days ago

    Imagine you want to launch 1000 long standing processes as oneshots.

    Nohup to a file would be a better usage than a screen multiplixier

    Why:

    • Because you can do a for loop over the nohup files to grep status and collate stats for the 1000 processes.
    • Because tmux/screen is easy to mentally manage but near impossible to navigate in list view or other

    “But you can extract a snapshot of your 1000 tmux windows to file and grep that for status!”

    Yes, great, but it’s not a neat solution, and tmux/screen snapshots might not capture everything due to window rendering artefacts.