Skip to content

fix(core): kill a command's whole tree, including timeout and setsid children - #509

Closed
lg2m wants to merge 4 commits into
mainfrom
fix/command-tree-teardown
Closed

lg2m wants to merge 4 commits into
mainfrom
fix/command-tree-teardown

Conversation

@lg2m

@lg2m lg2m commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Change

Linux commands now run under an embedded child-subreaper watcher. Cancellation, timeout, run end, and QQ death kill and reap descendants even after timeout/setsid changes their group. Commands get their actual PWD and no OLDPWD.

Verification

  • Timeout/cancel regressions fail on origin/main and pass with this fix.
  • cargo xtask check passed on add4c2c, including yielded-tree and QQ-SIGKILL coverage.
  • macOS native-run-in-place CI requested below; result pending.

Known impact

macOS uses descendant snapshots and cannot guarantee cleanup of a double-fork that exits before observation. Windows jobs are unchanged. The embedded helper uses signal-hook because rustix has no safe signal-handler registration API.

@lg2m lg2m added the ci:full label Oct 30, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T05:25:50.494640Z e802997 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: add4c2cdba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/qq-core/helper/src/main.rs Resolved
Comment thread crates/qq-core/helper/src/main.rs Resolved
Comment thread crates/qq-core/src/tools/shell.rs Resolved
Comment thread crates/qq-core/src/tools/shell.rs Resolved
@lg2m

lg2m commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed all seven initial Codex findings in 7ae9b6d: exclude/prune scanner identities, track original-group members after reparenting, preserve empty PATH components and sealed-image argv0, retain PID evidence through startup interruption, restore direct-Unix stdin, and remove fixed-delay test polling. Also canonicalized new test temp roots for macOS. Linux shell/process/teardown/yield suite: 92 passed. @codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e80299791d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lg2m lg2m closed this Oct 30, 2026
@lg2m
lg2m deleted the fix/command-tree-teardown branch October 30, 2026 05:57
@lg2m

lg2m commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

0.1.10 is to remove this not add a new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant