Skip to content

Restore ProcessPool signal dispositions after start - #6230

Open
binaryfire wants to merge 1 commit into
swoole:6.1from
binaryfire:fix/process-pool-signal-restoration
Open

binaryfire wants to merge 1 commit into
swoole:6.1from
binaryfire:fix/process-pool-signal-restoration

Conversation

@binaryfire

Copy link
Copy Markdown
Contributor

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 used SIG_DFL remained 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 SIGIO returns to its default terminating behavior.

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

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.24%. Comparing base (07606e5) to head (321ef49).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant