提交 ee102a0e 编写于 作者: D Daniel Imms

Don't kill ptyProcess on Windows

Rely on it cleaning up after itself after taskkill.exe kills the
process tree. Telling node-pty to clean up was causing a native
exception as the shell process no longer exists.

One concern is that this could leak process handles but I verified
that the OS cleans this up https://msdn.microsoft.com/en-us/library/windows/desktop/ms686722(v=vs.85).aspx

Fixes #31782
上级 a8ea82dd
......@@ -56,7 +56,6 @@ function queueProcessExit() {
clearTimeout(closeTimeout);
}
closeTimeout = setTimeout(function () {
ptyProcess.kill();
if (process.platform === 'win32') {
// Forcefully kill the entire process tree under the shell process
// on Windows as ptyProcess.kill can leave some lingering processes.
......@@ -65,6 +64,7 @@ function queueProcessExit() {
process.exit(exitCode);
});
} else {
ptyProcess.kill();
process.exit(exitCode);
}
}, 250);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册