Skip to content

Add reset signal traps#6

Open
samuel-williams-shopify wants to merge 1 commit into
mainfrom
add-reset-traps
Open

Add reset signal traps#6
samuel-williams-shopify wants to merge 1 commit into
mainfrom
add-reset-traps

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Summary

This adds Async::Signals::Reset.trap, an explicit process-level reset policy for signal traps restored by Async::Signals.reset!. The controller now clears inherited registrations while applying configured reset traps, including after fork, and falls back to the previously captured trap for signals without reset policy.

It also adds async/signals/graceful, which registers reset traps for SIGINT and SIGTERM that raise Interrupt on the main thread. This lets forked children keep graceful termination behavior without inheriting the parent controller's signal subscriptions.

Validation

  • /Users/samuel/.local/state/tec/toolchain/base_profile/bin/bundle exec sus
  • /Users/samuel/.local/state/tec/toolchain/base_profile/bin/bundle exec rubocop -A
  • COVERAGE=PartialSummary /Users/samuel/.local/state/tec/toolchain/base_profile/bin/bundle exec sus && /Users/samuel/.local/state/tec/toolchain/base_profile/bin/bundle exec bake covered:validate --paths .covered.db
  • /Users/samuel/.local/state/tec/toolchain/base_profile/bin/bundle exec bake decode:index:coverage lib

@samuel-williams-shopify samuel-williams-shopify force-pushed the add-reset-traps branch 3 times, most recently from 8e7b2e2 to 33932f9 Compare June 29, 2026 04:25
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