File tree Expand file tree Collapse file tree 3 files changed +666
-30
lines changed
Expand file tree Collapse file tree 3 files changed +666
-30
lines changed Original file line number Diff line number Diff line change 5353 "cross-env" : " ^5.1.4" ,
5454 "eslint" : " ^6.8.0" ,
5555 "mocha" : " 10" ,
56+ "node-gyp" : " ^9.4.0" ,
5657 "ps-list" : " ^6.0.0" ,
5758 "typescript" : " ^3.8.3"
5859 }
Original file line number Diff line number Diff line change @@ -257,6 +257,13 @@ static void OnProcessExit(uv_async_t *async) {
257257 DWORD exitCode = 0 ;
258258 GetExitCodeProcess (baton->hShell , &exitCode);
259259
260+ // Clean up handles
261+ // Calling DisconnectNamedPipes here or in PtyKill results in a crash,
262+ // ref https://github.com/microsoft/node-pty/issues/512,
263+ // so we only call CloseHandle for now.
264+ CloseHandle (baton->hIn );
265+ CloseHandle (baton->hOut );
266+
260267 // Call function
261268 v8::Local<v8::Value> args[1 ] = {
262269 Nan::New<v8::Number>(exitCode)
@@ -476,10 +483,6 @@ static NAN_METHOD(PtyKill) {
476483 }
477484 }
478485
479- DisconnectNamedPipe (handle->hIn );
480- DisconnectNamedPipe (handle->hOut );
481- CloseHandle (handle->hIn );
482- CloseHandle (handle->hOut );
483486 CloseHandle (handle->hShell );
484487 }
485488
You can’t perform that action at this time.
0 commit comments