Restore ProcessPool signal dispositions after start - #6230
Open
binaryfire wants to merge 1 commit into
Open
binaryfire wants to merge 1 commit into
binaryfire wants to merge 1 commit into
Conversation
ProcessPool saved only the previous signal handler pointer and restored it through Swoole's callback overload. A default SIGIO disposition was consequently replaced with a registered null callback, so later SIGIO delivery was warned about and ignored.\n\nSave each complete sigaction, clear the temporary Swoole registry entry, and restore the original action after the pool stops. Add an isolated Linux regression that verifies SIGIO returns to its default terminating behavior.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 6.1 #6230 +/- ##
=======================================
Coverage 86.24% 86.24%
=======================================
Files 110 110
Lines 16790 16790
Branches 2980 2980
=======================================
Hits 14481 14481
Misses 2309 2309 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Process\Pool::start()temporarily replaces its control-signal handlers. It restored only the previous handler pointer through Swoole's callback registration path, so signals that originally usedSIG_DFLremained routed through an empty Swoole callback after the pool stopped.Save and restore each complete signal action, and clear the temporary Swoole registry entry before restoring it. This preserves the original handler, flags, and mask.
The regression runs the pool in an isolated child and verifies that Linux
SIGIOreturns to its default terminating behavior.