reptyr - change shell of a running program

Forum rules
General talk about software - if the program is not in the repos, please links to the developer's page or github.
User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

reptyr - change shell of a running program

Unread post by wuxmedia » Sun Jan 04, 2015 1:24 pm

https://github.com/nelhage/reptyr
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
Bit of weird one, perhaps not much use for home users.
Would have been handy when I was running 6 IMAPsync scripts all on one shell. ALL with output to STDOUT...
"Seek, and Ye shall find"
"Github | Chooons | Site"

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: reptyr - change shell of a running program

Unread post by machinebacon » Sun Jan 04, 2015 3:16 pm

Nice, it's in the repos btw :)

reptyr - Tool for moving running programs between ptys
retty - attach processes running on other terminals

:)
..gnutella..

User avatar
simgin
Meme Fodder
Posts: 1167
Joined: Sun Jan 06, 2013 12:07 am
Location: Bradford-on-Avon, UK

Re: reptyr - change shell of a running program

Unread post by simgin » Sun Jan 04, 2015 4:33 pm

^ MB, nothing seems to get under your radar :D
Someone told me that I am delusional, I almost fell off my unicorn.

User avatar
Dr_Chroot
Alfalfa
Posts: 1100
Joined: Mon Jun 09, 2014 9:49 pm
Location: among the sagebrush
Contact:

Re: reptyr - change shell of a running program

Unread post by Dr_Chroot » Mon Jan 05, 2015 3:35 am

This... this is actually quite fantastic. Thanks, wuxie!
Fight internet censorship.
EFF | Tor Project | Bitcoin

"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: reptyr - change shell of a running program

Unread post by wuxmedia » Mon Jan 05, 2015 9:07 am

^ no probs, kudos to bacon for pointing out repos, and there are different progs for pty and tty.
I spend most of my time in a PTY, thats why found this one.
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: reptyr - change shell of a running program

Unread post by dkeg » Wed Jan 07, 2015 2:14 am

good share wux. I don't really have a use case for this, but I can sure see how it can be a helpful tool.

Work hard; Complain less

User avatar
elixir
Weight Watcher
Posts: 357
Joined: Fri Feb 21, 2014 8:25 am

Re: reptyr - change shell of a running program

Unread post by elixir » Wed Jan 07, 2015 7:03 am

Hmmm... I thought you could do this manually while scripting?
Out of the corner of your eye you spot him... Shia LaBeouf.

https://www.youtube.com/watch?v=o0u4M6vppCI

User avatar
stark
MILF
Posts: 521
Joined: Sat Sep 27, 2014 6:38 pm
Location: Arpanet
Contact:

Re: reptyr - change shell of a running program

Unread post by stark » Wed Jan 07, 2015 2:36 pm

Looks really helpful, just one question is this similar to dtach ?
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: reptyr - change shell of a running program

Unread post by machinebacon » Wed Jan 07, 2015 4:44 pm

^ the difference is: attach a session vs attach a(n already running) process
..gnutella..

User avatar
stark
MILF
Posts: 521
Joined: Sat Sep 27, 2014 6:38 pm
Location: Arpanet
Contact:

Re: reptyr - change shell of a running program

Unread post by stark » Thu Jan 08, 2015 3:57 pm

Woah! Now I have to look into this :D
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: reptyr - change shell of a running program

Unread post by dkeg » Sat Jan 17, 2015 5:58 pm

okay, reptyr rocks! It works as advertised. Good use case for me was changing a running irc session(s) to tmux for whatever reason. Cool find. Approved.

Work hard; Complain less

Post Reply