Reptyr is a new utility to switch a running program to a new terminal.
Committed to Sunrise, waiting for review: http://overlays.gentoo.org/proj/sunrise/browser/sunrise/app-misc/reptyr +EBUILD, InOverlay, please.
Hello, I'd like to add this to the main portage tree but I can't get it to work, which seems odd to me because the usage is simple. Can you give me a test case please? I've tried reptyr'ing emerge/ebuild commands and just see something like this: % reptyr 4863 [+] Allocated scratch page: b744c000 [+] Looking up fds for tty in child. [+] Resolved child tty: 34816 % And the job in the other terminal goes to the background. (This is being done through 2 independent ssh sessions.
Attaching to certain types of processes doesn't work so well (this is known, mentioned in the man page), but I can attach to an emerge. Well, it worked once, at least. In one TTY, $ sudo emerge -1 glibc Password: These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-libs/glibc-2.11.3 USE="hardened -debug -gd -glibc-omitfp (-multilib) -nls -profile (-selinux) -vanilla" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB ... And then in another, $ ps ax ... 21719 pts/0 S+ 0:00 sudo emerge -1 glibc $ sudo ./reptyr 21720 Password: [+] Allocated scratch page: 7f73efd8a000 [+] Looking up fds for tty in child. [+] Resolved child tty: 8800 [+] Found an alias for the tty: 0 [+] Found an alias for the tty: 1 [+] Found an alias for the tty: 2 [+] Found an alias for the tty: 8 [+] Opened the new tty in the child: 6 [+] Target is not a session leader, attempting to setsid. [+] Forked a child: 22202 [+] Did setsid() [+] Set the controlling tty >>> Unpacking glibc-2.11.3-patches-2.tar.bz2 to /var/tmp/portage/sys-libs /glibc-2.11.3/work * Applying Gentoo Glibc Patchset 2.11.3-2 ... * 0020_all_glibc-tweak-rfc1918-lookup.patch ... I am getting a segfault with v0.2 on my work machine, but git HEAD works. I'm going to send a doc patch and can ask the author to tag another release if that helps.
Closing since I added the latest 0.3 release to the main tree.