Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Seems 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.


"Do one thing and do it well."


Judging 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.


The 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.


I 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: