Re:Reptyr – Reparent a running program to a new terminal
by pmoriarty on Sunday December 07, 2014 @01:20PM
(#8713025)
This is useful for those cases where you didn't start screen first, such as when you either forgot or didn't think you'd need it but it turned out you did.
Re:Reptyr – Reparent a running program to a new terminal
by anaphor on Sunday December 07, 2014 @03:15PM
(#8713400)
I just alias my terminal shortcut/command to start screen/tmux every time
Re:Reptyr – Reparent a running program to a new terminal
by chrisseaton on Sunday December 07, 2014 @04:24PM
(#8713621)
Doesn't using screen have some drawbacks? For example it breaks native scrolling in the OS X terminal app, so I wouldn't want to run screen unless I really needed it.
Re:Reptyr – Reparent a running program to a new terminal
by anaphor on Sunday December 07, 2014 @04:55PM
(#8713721)
Yeah I don't know. I only mentioned screen to be fair. I use tmux and I don't usually have any problems, although I get problems when I use it with mosh sometimes (particularly weechat mouse support doesn't seem to work well).
Re:Reptyr – Reparent a running program to a new terminal
by pronoiac on Sunday December 07, 2014 @05:33PM
(#8713862)
This may be a dumb question, but wouldn't this work?
* press ctrl-z to put the program in the background
* start screen
* run fg within screen
Re:Reptyr – Reparent a running program to a new terminal
by caipre on Sunday December 07, 2014 @06:09PM
(#8713991)
screen (and tmux) start a new instance of the shell, which would have no knowledge of the backgrounded process. You'd just see the message "fg: no current job"
Re:Reptyr – Reparent a running program to a new terminal
by emmelaich on Sunday December 07, 2014 @11:12PM
(#8714881)
And even if you could(1), the background process typically has the terminal open - and screen uses a separate pseudo terminal aka pty -- As suggested by the name - rePTYr
(1) ^Z sends SIGSTOP; to continue you can signal SIGCONT. But then what?!
[1] http://blog.gmane.org/gmane.os.netbsd.devel.kernel