microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.43k stars 232 forks source link

Windows 10 0.11.0-beta hangs on IConptyNative.connect) #532

Open starpit opened 2 years ago

starpit commented 2 years ago

Environment details

Issue description

We haven't had a problem with 0.10.0. With 0.11.0 betas on Windows, the conpty bits hang

    if (this._useConpty) {
console.error('######################### 9') // we see this
      const connect = (this._ptyNative as IConptyNative).connect(this._pty, commandLine, cwd, env, c => this._$onProcessExit(c));
      this._innerPid = connect.pid;
console.error('######################### 10') // we don't see this
    }

We get the first printf, but not the second. We get no printfs for _$onProcessExit. We are spawning this from the Electron main process, which hasn't been a problem (and still isn't a problem, on every other platform). I have seen #512 but that user saw the hang on exit, whereas we can't even get the connection established.

Fwiw, the spawned command line is powershell.exe "echo hi"