Show a warning if user attempts to close a terminal which has running processes in it.
top) in Theia terminal and any other one.OS and Theia version:
OS: Ubuntu 19.10
Theia: master
Diagnostics:
I am not sure whether it is possible. Terminals are stream based, we don't really know what a user is doing. We could have something like that for tasks.
cc @elaihau @RomanNikitenko @marechal-p ?
I think a new internal method was added to test if a shell has a subprocesses running (meaning the shell is in use). See https://github.com/eclipse-theia/theia/blob/master/packages/terminal/src/node/shell-terminal-server.ts#L66-L88
I think a new internal method was added to test if a shell has a subprocess running (meaning the shell is in use). See https://github.com/eclipse-theia/theia/blob/master/packages/terminal/src/node/shell-terminal-server.ts#L66-L88
+1
We should check though it does not break VS Code extensions. If they can close terminal programmatically then there should not be such dialogs. Maybe also make it configurable via preferences.
@akosyakov right, it should work only when clicking X button manually, not by commands. Preference should be added as well, but its default must prevent closing.
Most helpful comment
We should check though it does not break VS Code extensions. If they can close terminal programmatically then there should not be such dialogs. Maybe also make it configurable via preferences.