Repository navigation
Conversation
This branch has not been deployed
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
On POSIX,
PluginProcesscheckskill(pid, 0)for up to three seconds before callingwaitpid(). An exited child remains visible tokill(pid, 0)while it is a zombie, so even a successful plugin shutdown consumes the entire grace period. Destructing six plugin processes sequentially adds about 18 seconds to shutdown.Poll and reap children with
waitpid(..., WNOHANG)instead. Retry interrupted waits, accept an already reaped child, and retain the existing SIGTERM, three-second grace period, and SIGKILL fallback for a child that actually stays alive. Windows behavior is unchanged.Add four POSIX regression cases using the real
PluginProcessand IPC implementation: an unreaped zombie, an already reaped child, a child that exits on SIGTERM, and one that ignores SIGTERM.Validation
-Wall -Wextra -Werror: 0 ms, 0 ms, 100 ms, and 3002 ms respectively.Millennium unloaded successfully, with no Steam coredumps or remaining Steam/plugin processes. This was an incremental comparison with other local shutdown fixes held constant; the live installation includes those separate fixes.The regression test can be run independently: