It's sunday and I left an instance of R running in the office. The script finished running, and I would like to save my workspace without going to the office. I can ssh to the computer, but I have not run the program into screen.
Is there a way, over ssh, to disown the process (I don't have access to jobsid of the terminal the program is running on!) and reattach it with say, reptyr? Reptyr and reptyr -T don't work without previously disowning the process
28845 3diag 20 0 139.3m 10.4m 0.0 0.1 0:12.06 S `- urxvtd
5327 3diag 20 0 16.4m 4.6m 0.0 0.1 0:00.02 S `- bash
5335 3diag 20 0 3499.3m 3.244g 0.0 43.3 171:57.89 S `- R
The unique part of my question is that I explicitly require to detach a program without having access to the terminal in which it was created.
reptyrman page does not say you have to disown the process first. It says you may want to. – meuh May 01 '16 at 11:52Similarly: reptyr -T 28845 [-] Child is not connected to a pseudo-TTY. Unable to steal TTY. Unable to attach to pid 28845: Invalid argument
– Three Diag May 01 '16 at 11:57reptyr 5335 Unable to attach to pid 5335: Operation not permitted The kernel denied permission while attaching. If your uid matches the target's, check the value of /proc/sys/kernel/yama/ptrace_scope. For more information, see /etc/sysctl.d/10-ptrace.conf
– Three Diag May 01 '16 at 11:57urxvtd, it's just a daemon. Did you look into the files mentioned by the second invocation? Please update the post instead of commenting. – Alexander Batischev May 01 '16 at 12:17