Repository navigation
Prevent adb.exe error dialogs when Windows shuts down - #1256
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Shutting down Windows with ADB enabled could show an adb.exe error dialog (0xc0000142), because the host kept starting adb while the session ended. The host now starts no adb once Windows reports the session is ending or the bootstrapper stops it for a session end.
Testing
Full solution build and tests pass (Plugin.Cli's A_project_is_actually_built_before_its_output_is_resolved fails locally on main too), with new tests for the refused spawns, a shutdown that gets cancelled, the shutdown reason and the Windows shutdown check. On a running host, the session-end stop request is accepted over loopback and refused on the public port. Not yet verified on a real Windows shutdown.
Checklist