New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose pty terminal api to detect when it is explicitly killed by a user #130231
Comments
Does this work? Lines 9680 to 9692 in 19959ec
|
It is |
I believe we treat both these cases the same internally, I since there is the difference of the extension host going down when a window is closed or reloaded, take that into consideration as to whether you want to kill the long running process or not. |
Is this still out of scope? I have a hack in my extension as you suggested by it's broken now due to #152204 , which I'm sure it will be fixed, but having a way to differentiate when a user closes the terminal explicitly would be nice |
@Tyriar Would you be opened if we propose some API to distinguish between close caused by explicit user action to kill the terminal or by system (i.e. unload of extension host caused by window reload or close). As @jeanp413 mentioned we have code like that: https://github.com/gitpod-io/openvscode-server/blob/fa1ade7210e7bba9075dadf3d84a7f65ffcd3da1/extensions/gitpod-shared/src/features.ts#L963-L965 which got broke by last release, but generally we hear complaints from time to time that underlying jobs getting closed by window reloads. We would like to have more robust means than timeout. |
Sure you can propose and I'll bring it to our API meeting to discuss, I guess something like |
Right now there is only close method which is called by different user actions. I need to distinguish the case when the terminal is closed because the user explicitly requested closing of this terminal or because a user, for instance, close the window and disposure of the frontend terminal as well as the ext host terminal service call
close
. Maybedispose
is missing?Context: I have long-running processes to which pty is connecting. Such processes should be stopped if a user requests explicit killing of frontend terminals, otherwise they should not be. But right now they got stopped whenever a user closes the window.
The text was updated successfully, but these errors were encountered: