This seems useful. I would welcome some guidance on what's going wrong, here.
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