If you like this tool, you might also be interested in reptyr, which lets you reparent a process to a different tty.
https://blog.nelhage.com/2011/02/changing-ctty/
and some other tools similar to reptyr:
https://github.com/jerome-pouiller/reredirect/
https://github.com/pasky/retty
https://github.com/trishume/telefork
and some other tools similar to reptyr:
https://github.com/jerome-pouiller/reredirect/
https://github.com/pasky/retty
https://github.com/trishume/telefork