vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

Session watcher should not rely on pid

Open IllustratedMan-code opened this issue 1 year ago • 7 comments

Is your feature request related to a problem? Please describe. I use an HPC compute cluster(linux), and have the vscode-server running on the "head" node, while the R process runs on a "compute" node. These are actually different computers, but access the same filesystem. They have different process tables, ie, the pid of a process on the compute node can't be monitored from the head node. I feel this cluster setup is pretty common in the research community, so this issue doesn't just affect me.

Describe the solution you'd like As the nodes on the cluster use the same filesystem, the current temp file solution should work, but there needs to be some other mechanism other than pid to monitor the status of the process, ie don't cleanup the session if the pid isn't visible to process.kill(pid, 0).

Describe alternatives you've considered Unfortunately I can't just ssh directly into a compute node and run vscode-server there, I've definitely tried.

Additional context I launch the R session in a compute node using a custom script that I load using the r.rterm.linux setting. It almost works, except for the above pid problem. Essentially, .vsc.attach() works perfectly, but then the vscode-R process can't see the pid, so it immediately cleans the session.

IllustratedMan-code avatar Jul 05 '23 14:07 IllustratedMan-code