Parent processes (winpty-agent.exe, etc.) do not exit when shell process exits by itself #333
Labels
bug
Issue identified by VS Code Team member as probable bug
*out-of-scope
Posted issue is not in scope of VS Code
windows
Environment details
Issue description
If a shell process suicides, its parent processes (not including the main node.js process) will not exit automatically unless
pty.kill()
is called. Check the following issue reproducing code:The code above creates 10
winpty-agent.exe
s and 10conhost.exe
. However,node-pty
has notified user that those shell processes has exited by emittingexit
event, misleading users that the process has exited cleanly.It seems that there is no graceful way to determine whether the process is killed by calling
pty.kill()
or exited by itself (and therefore we should callpty.kill()
inside theonExit
handler). However, invokingpty.kill()
twice on the same process will raise error (can be caught though).The text was updated successfully, but these errors were encountered: