-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
ITerminalInstance.onDisposed can fire multiple times for a single instance #19026
Comments
@Tyriar this one would be important for me for the January milestone. |
I'm seeing terminalInstance.onExit(code => {
console.log('onExit: ' + code);
}); to There is this in if (this._process) {
if (this._process.connected) {
this._process.kill();
}
this._process = null;
} I can see why this would not happen when you call |
Happens for me under Windows even if the terminal is created the first time. Here is my tasks.json {
"version": "0.1.0",
"_runner": "terminal",
"tasks": [
{
"taskName": "tsc",
"command": "tsc -w",
"isShellCommand": true,
"isBackground": true,
"problemMatcher": "$tsc-watch"
}
]
} Mt tsconfig.json {
"compilerOptions": {
"module": "commonjs",
"sourceMap": true,
"target": "es6"
}
} and a ts file with some errors
Observe: breakpoint in dispose is hit but none of the exit callbacks are hit. |
I added a console.log statement and that is printed. Looks like a debugger problem. |
OK. Adding console.log statements only I get the following sequence: Dispose called terminalTaskSystem.ts:412 So I do get the exit but I do get dispose twice. Changed title. |
Not critical for January anymore since I protected myself against the second dispose call. |
Steps to reproduce:
Observe:
you get ITerminalInstance.onDisposed() but no ITerminalInstance.onExit(). Since the process exists as well I would expect to first receive the onExit and then the onDisposed event.
The text was updated successfully, but these errors were encountered: