1

All,

I'm accessing a remote server via SSH and running an R process on that server. We're in development right now, so it's important for me to enter the R shell and run line by line commands. Last night I logged on to the server, sent a bunch of code to the shell, and called it a night. This morning, when I tried to get back into the shell I found that I had a broken pipe and needed to reestablish the connection. Unfortunately, this also took me out of the R shell.

Is there a way to, from a command line linux interface, re-enter the shell/workspace of an existing R process? I've attached a display of system processes with the one I'm interested in highlighted.

Cheers, Aaron

aaron
  • 113
  • 8

1 Answers1

0

Going Forward

You should be running R under gnu screen or tmux.

See also emacs tramp over an unreliable connection if you want to use Emacs/ESS.

Existing Process

As for communicating with an existing process (whether R or shell), I suggest that you try to write to its handle available via the proc filesystem.

E.g.,

$ echo here >> /proc/$$/fd/1
here

where $$ is the current shell's PID and 1 is the stdout.
You can try to echo a command into 0 (stdin). This might not work though...

sds
  • 2,108