Skip to content

#109: tests for multi-thread signal delivery + CHANGELOG#116

Merged
EdmondDantes merged 1 commit into
mainfrom
109-signal-delivery-is-non-deterministic-in-multi-thread-programs
May 11, 2026
Merged

#109: tests for multi-thread signal delivery + CHANGELOG#116
EdmondDantes merged 1 commit into
mainfrom
109-signal-delivery-is-non-deterministic-in-multi-thread-programs

Conversation

@EdmondDantes
Copy link
Copy Markdown
Contributor

Cover the worker-thread signal path with five new .phpt cases:

  • 008: ThreadPool(2) — both workers await SIGUSR1, both receive.
  • 009: spawn_thread × 2 — same shape, plain threads.
  • 010: unregistered SIGINT/SIGTERM/SIGUSR1 still kill the process at OS level (parity with baseline; verifies the Zend patch did not break Ctrl-C semantics for apps that opt out of signal handling).
  • 011: pcntl_signal still intercepts SIGUSR1 (zend_sigaction path is unchanged by the fix).
  • 012: ThreadPool(2) workers register different signals concurrently (SIGUSR1 vs SIGUSR2) and each receives only its own.

Paired with the Zend/zend_signal.c fix in php-src.

Cover the worker-thread signal path with five new .phpt cases:

- 008: ThreadPool(2) — both workers await SIGUSR1, both receive.
- 009: spawn_thread × 2 — same shape, plain threads.
- 010: unregistered SIGINT/SIGTERM/SIGUSR1 still kill the process at
  OS level (parity with baseline; verifies the Zend patch did not
  break Ctrl-C semantics for apps that opt out of signal handling).
- 011: pcntl_signal still intercepts SIGUSR1 (zend_sigaction path
  is unchanged by the fix).
- 012: ThreadPool(2) workers register *different* signals concurrently
  (SIGUSR1 vs SIGUSR2) and each receives only its own.

Paired with the Zend/zend_signal.c fix in php-src.
@EdmondDantes EdmondDantes self-assigned this May 11, 2026
@EdmondDantes EdmondDantes linked an issue May 11, 2026 that may be closed by this pull request
@EdmondDantes EdmondDantes merged commit 5cbeaf2 into main May 11, 2026
6 checks passed
@EdmondDantes EdmondDantes deleted the 109-signal-delivery-is-non-deterministic-in-multi-thread-programs branch May 11, 2026 08:30
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.

signal(): delivery is non-deterministic in multi-thread programs

1 participant