Skip to content

fix(until): terminate surviving descendants after readiness - #229

Merged
matbrgz merged 2 commits into
masterfrom
fix/until-descendants-79
Sep 27, 2026
Merged

matbrgz merged 2 commits into
masterfrom
fix/until-descendants-79

Conversation

@matbrgz

@matbrgz matbrgz commented Sep 27, 2026

Copy link
Copy Markdown
Member

Summary

After --until matches, the direct child can exit before a descendant that ignores SIGTERM. The existing fallback watchdog then disarms, leaving the descendant running.

This change checks the process group after the direct child is reaped, gives remaining members a short grace period, and sends SIGKILL if the group still exists. It adds an integration test that waits for a descendant to install its SIGTERM handler before printing READY, then verifies that it cannot continue running.

Closes #79.

Verification

  • cargo test --locked --test until_tests (9 passed)
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo fmt

Antigravity drafted the initial patch in an isolated worktree; I reviewed it, strengthened the regression test, and ran the checks above.

@matbrgz
matbrgz merged commit 70def69 into master Sep 27, 2026
21 checks passed
@matbrgz
matbrgz deleted the fix/until-descendants-79 branch September 27, 2026 14:20
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.

[Feature]: --until <TEXT> — measure time until a long-running process prints a readiness line (port hyperfine#814)

1 participant