Skip to content

Remote Reconnect Forces Ctrl+C on Running Terminal Process for Environment Activation #1288

@MartinKliemank

Description

@MartinKliemank

This was mainly copied from #947 , as it just happened to me and the other issue was closed but apparently not fixed:

"When Ctrl+C reconnects to a remote terminal, the extension appears to attempt sending Ctrl+c to terminate the currently running user process in the terminal before activating the python environment.

We believe this behavior is undesirable. Specifically, for processes that are long-running and have extremely high restart costs (such as deep learning training), the extension forcibly killing these processes without user confirmation causes significant disruption and potential data loss.

Furthermore, I suggest avoiding the use of Ctrl+C or similar methods to interfere with or kill user-running processes when the remote terminal is reconnected."

I happened to have one terminal with tmux open that had been running for > 2days during a short disconnect. Upon reconnect "Ctrl + C, conda activate ..." was issued to all open terminals, killing the process. If a user process is already running in the terminal, the environment is likely already properly selected, otherwise it could not be running, so this behaviour does not seem desirable or helpful.

This is with the current release version of VSCode and the extension, all stock settings in the extension.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions