Skip to content

Harden subprocess wait and signaling primitives - #3197

Merged
floitsch merged 3 commits into
masterfrom
fix/idempotent-subprocess-wait
Aug 29, 2026
Merged

Harden subprocess wait and signaling primitives#3197
floitsch merged 3 commits into
masterfrom
fix/idempotent-subprocess-wait

Conversation

@floitsch

@floitsch floitsch commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

  • make repeated native subprocess wait registration idempotent
  • prevent intrusive-list corruption when a wait is interrupted and retried
  • propagate POSIX kill failures instead of silently discarding them
  • propagate Windows TerminateProcess failures and only mark a process killed after success
  • add direct regression coverage for repeated registration and signaling errors

The cancellation-safe pkg-host waiter is toitlang/pkg-host#98. The supported Process termination API is toitlang/pkg-host#99.

Tests

  • cmake --build build/host --target toit -j4
  • build/host/sdk/bin/toit analyze tests/subprocess-wait-registration-test.toit
  • build/host/sdk/bin/toit run tests/subprocess-wait-registration-test.toit
  • rebuilt SDK passed the pkg-host process kill regression

@floitsch floitsch changed the title Make subprocess wait registration idempotent Harden subprocess wait and signaling primitives Aug 29, 2026
@floitsch
floitsch merged commit d063d27 into master Aug 29, 2026
37 checks passed
@floitsch
floitsch deleted the fix/idempotent-subprocess-wait branch August 29, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant