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
    1
    ·
    1 day ago

    Oh a systemd-logger, I dont have access to the logs, only the admin does. Plus I can’t reattach to the process that way

    • just_another_person@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      22 hours ago

      You can use it to log to a defined file in userspace. You don’t need to “reattach” to the process because all of the output goes through this util. Use signal handling to control the process.

      • tetris11@feddit.ukOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        22 hours ago

        You’re probably right that that’s likely enough for non-interactive tools