-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove job object and startup suspended behavior #2198
Conversation
…uld clean themselves up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential 0.3 QOL fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Opens the door to investigate it more. I'll make sure it gets reactivated when merging this closes it. And I'll keep working on testing scenarios around the exit. |
🎉 Handy links: |
Summary of the Pull Request
Removes the
ConhostConnection
work that set up a job object and created everything suspended. I don't believe this is or should be necessary as the ConPTY'd conhost should realize that the server end of the connection is gone and gracefully shut down (and tell its clients to shut down).PR Checklist
Detailed Description of the Pull Request / Additional comments
I believe that using a job here is just covering up an underlying problem with outstanding handles, bad eventing, or other message communication failures. The job is a big hammer solution to just terminate everything when the terminal goes down, which I believe is responsible for some of the
pwsh.exe
post-mortem debugger sessions I'm seeing (as the conhost goes down and then pwsh throws an unhandled exception).Overall, if there's an issue in this area, I think we can debug and diagnose it individually and fix the leftover handle, untriggered/unhandled event, etc. So I'm taking out the job object and we'll see how things go.
Also, I believe some of the issues that this was covering up have been resolved in other ways between when it was installed and now. I did some playing around and didn't get any orphaned conhost.exes (or their clients). So this must be already better than it used to be.
Validation Steps Performed
Launched Terminal, closed it normally.
Launched Terminal, killed it in process explorer.
Launched Terminal with many tabs of varying types (pwsh, powershell, cmd) and killed Terminal in process explorer.
In all cases, the conhosts and their children were cleaned up appropriately without the job object.