4 ms·
It's a nice tool (reptyr), but not particularly convenient to use, requiring several steps to move the process to the background and remembering the PID etc. I
by kennu 4y ago
It's a nice tool (reptyr), but not particularly convenient to use, requiring several steps to move the process to the background and remembering the PID etc. I do wish this was a more streamlined, standard feature of Unix/Linux shells. Something like a simple integrated "pushproc"/"popproc" command.
- kleiba 4y ago"Do one thing and do it well."
- mananaysiempre 4y agoJudging from the amount of infrastructure that’s been built around background text-mode processes, job control does half a thing and sucks at it. It’s still mandatory, so I wouldn’t blame people for wanting to streamline the process of disassociating from that half-baked builtin support and substituting it with a replacement mechanism.
- CGamesPlay 4y agoSeems not super hard to do. A shell function could do the bg, disown, and use the tmux remote API to start a new window and remotely execute reptyr in it.
- deleted 4y ago[deleted]
- jcynix 4y agoThe streamlined version is what "screen -d …" does, so it's some kind of standard feature, isnt it?. The only "drawback" I see is that you have to plan ahead to use screen. When I start long running jobs, I try do start them that way, so I can check on them (and their output in a screen logfile) from anywhere: screen -L -Logfile "batch-xyzzy-221005a" -S "xyzzy1" bash job.sh Now I can just check the log with grep or less, or reattach to it if some action is needed.
- kennu 4y agoI also use tmux beforehand, when I plan ahead. But I think this discussion is about those situations where you didn't plan ahead and still need to somehow keep a process running.