Closed ssadler closed 13 years ago
Unfortunately, there is no good way to free the old terminal in general. You can background the program and then do 'bg; disown
' yourself, or just close the old terminal (i.e. close the xterm or kill the screen window or whatever) -- reptyr causes the attached program to ignore SIGHUP
so that it shouldn't be killed.
Out of interest, is it not possible to write commands to background and detatch the process to the old terminal?
If I was willing to assume that the shell understands the "bg" and "detach" commands, I could probably inject those into the terminal and feed them to the shell at an appropriate time, and it wouldn't be unreasonable to add an option to do that. It wouldn't be trivial, though, since I'd need to find the other end of the pty in order to inject commands, and I don't know of a straightforward way to do that.
Ah okay. Thanks
When grabbing a process, the old terminal is not freed. Ctrl-\ will free it but kill the original process. Ideally you'd want the terminal to be freed and a message saying it was grabbed by another terminal.