Repository navigation
Launcher: don't crash when a game quits before its exit is watched - #30
Merged
Merged
Conversation
NSRunningApplication reports a process id of -1 once the game has already gone, and DispatchSource.makeProcessSource traps converting a negative pid. Such a game is treated as ended at once. Fixes #28
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.
A game that quits right after it is opened makes NSRunningApplication report a process id of -1.
watchForExitpassed that toDispatchSource.makeProcessSource, which traps converting a negative pid to UInt, so the launcher died with SIGTRAP (issue #28, launcher 0.2.28 on an M4). Now a game that is already gone is treated as ended at once, the same path a normal exit takes.Fixes #28