Skip to content

Consider using taskkill.exe on Windows to gracefully terminate processes #781

@meganrogge

Description

@meganrogge

Follow-up from microsoft/vscode#248947

I have found that with conptyDll enabled, terminal processes are not killed gracefully - for example, addresses in use remain blocked when I kill a terminal and rerun a server.

} else {
// Close the input write handle to signal the end of session.
this._inSocket.destroy();
(this._ptyNative as IConptyNative).kill(this._pty, this._useConptyDll);
this._outSocket.on('data', () => {
this._conoutSocketWorker.dispose();
});
}

Using taskkill.exe seems to work both for when conptyDll is enabled and disabled

https://github.com/microsoft/vscode/pull/248947/files#diff-7fa6408c8e509843aa68feb54ddc0dc812a3d8cbfc5e6df7e5ed25d90978c082R396-R402

We should consider moving this from vscode into node-pty.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions