Skip to content

Support SIGUSR1, SIGUSR2, and SIGWINCH - #546

Merged
lukewilliamboswell merged 1 commit into
mainfrom
fix/issue-538
Nov 11, 2026
Merged

lukewilliamboswell merged 1 commit into
mainfrom
fix/issue-538

Conversation

@lukewilliamboswell

Copy link
Copy Markdown
Collaborator

Summary

Closes #538.

  • Add User1(unix), User2(unix), and WindowResize(unix) requests for SIGUSR1, SIGUSR2, and SIGWINCH, with the existing System.Unix witness requirement.
  • Extend cooperative interruption, event coalescing, and polling through the native host and regenerated ABI.
  • Move the private native-I/O wake signal to SIGURG so SIGUSR2 remains available to applications. Check cancellation and worker reuse while SIGUSR2 is caught.
  • Use each Unix signal's native number for unhandled Interrupted exit statuses, preserving Ctrl-C and SIGTERM behavior.
  • Cover sleep and stdin interruption, cleanup, terminal restoration, and witness rejection for the new requests.

Verification

  • cargo fmt --all -- --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked --all-targets passes all 199 tests.
  • ci/regenerate_glue.sh --check passes with the CI-pinned Roc nightly and matching glue source.
  • python3 scripts/test_system_api.py passes 1 positive and 22 negative compiler checks.
  • python3 scripts/build.py --target x64musl, then ./scripts/test.py --no-build, pass the full native suite with the CI-pinned Roc nightly, including all six new signal cases.
  • Windows GNU cargo check --locked --all-targets passes when cross-compiled with Zig from Linux.
  • A separate application propagating Interrupted from main! exits 130, 143, 138, 140, and 156 for SIGINT, SIGTERM, SIGUSR1, SIGUSR2, and SIGWINCH respectively on Linux.

@lukewilliamboswell
lukewilliamboswell merged commit 8fa8f72 into main Nov 11, 2026
32 checks passed
@lukewilliamboswell
lukewilliamboswell deleted the fix/issue-538 branch November 11, 2026 02:14
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.

Allow handling more signals

1 participant