Skip to content

Feature/signal api#95

Merged
EdmondDantes merged 3 commits into
mainfrom
feature/signal-api
Feb 20, 2026
Merged

Feature/signal api#95
EdmondDantes merged 3 commits into
mainfrom
feature/signal-api

Conversation

@EdmondDantes
Copy link
Copy Markdown
Contributor

No description provided.

Implement PHP-facing signal handling: Signal backed enum (int) with
14 cases and signal() function returning Future<Signal>.
Supports optional Completable cancellation parameter.
Known issue: 152-byte memory leak under cancellation path.
…ixes

- Save and restore Zend sigaction handlers around libuv signal lifecycle
  to prevent "handler was replaced" warning from zend_signal_deactivate()
- Forward signals to SIGG(handlers) in libuv callback so pcntl and
  Zend timeout handlers still work when libuv owns the signal
- Add get_gc to Future to expose exception/result to cycle collector,
  fixing leak caused by Future↔Exception circular reference via trace
- Break cancel_cb↔timeout circular reference by releasing cancellation_obj
  after signal cancellation callback fires
- Fix test 002 to use Signal::SIGUSR1->value instead of undefined SIGUSR1
@EdmondDantes EdmondDantes merged commit cad1bdc into main Feb 20, 2026
1 check passed
@EdmondDantes EdmondDantes deleted the feature/signal-api branch February 20, 2026 18:21
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