Reptyr: move an already-running process into screen (better than screenify)
blog.nelhage.com
blog.nelhage.com
met% ps -aef | grep python | grep time
myusername 25476 25417 0 16:05 pts/9 00:00:00 python -c import time, sys; [sys.stdout.write(str(i)+"\n") or time.sleep(1) for i in range(1000)]
met% sudo ~/src/reptyr/reptyr 25476
[+] Allocated scratch page: 7f4477b3d000
[+] Looking up fds for tty in child.
[+] Resolved child tty: /dev/pts/9
[+] Found an alias for the tty: 0
[+] Found an alias for the tty: 1
[+] Found an alias for the tty: 2
Unable to attach to pid 25476: Permission denied
Same thing happens when I try to take control of an ssh session.Ubuntu 10.04.1, built with
met% git clone https://github.com/nelhage/reptyr.git
met% cd reptyr/
met% make strace -o /tmp/reptyr.strace ~/src/reptyr/reptyr PID
and then send me the contents of /tmp/reptyr.straceThanks!
Does it work with x apps? Because it would be great to be able to start my IDE over ssh on the laptop knowing I could switch to the desktop with losing what I had open.
If someone wants to try a port to, say, a BSD that abstracts the syscalls and ioctls into a platform-specific way, I'd be happy to take a look.