DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: rePTYr - Re-parent a running process to a new TTY  (Read 6,117 times)

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,027
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Linux User
rePTYr - Re-parent a running process to a new TTY
« on: September 07, 2014, 11:29 PM »
This one's going to be fun...
Quote
reptyr - A tool for "re-ptying" programs.
reptyr is a utility for taking an existing running program and attaching it to a new terminal. Started a long-running process over ssh, but have to leave and don't want to interrupt it? Just start a screen, use reptyr to grab it, and then kill the ssh session and head on home.



from NixCraft Facebook page
All children left unattended will be given a mocha and a puppy.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Re: rePTYr - Re-parent a running process to a new TTY
« Reply #1 on: September 09, 2014, 04:01 AM »
That sounds pretty handy!  Thanks for sharing :)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • Plugin Coding Medal
    • Participated in NANY Challenge Three Times
Re: rePTYr - Re-parent a running process to a new TTY
« Reply #2 on: September 09, 2014, 04:09 AM »
Just tried it with some success.

Remember those times when somehow you can't get back to your X session, but there's something running in a terminal you'd like to interact with or see?  Looks like this could work -- a quick test suggests it might work sometimes.

On a side-note, AFAICT, this is Linux-only.

Original address: https://www.donationcoder.com/forum/index.php?topic=38906.0