Skip to content

Add std JobObject kill-on-close opt-in - #64

Closed
kreneskyp wants to merge 2 commits into
watchexec:mainfrom
kreneskyp:ir783-job-object-kill-on-close
Closed

kreneskyp wants to merge 2 commits into
watchexec:mainfrom
kreneskyp:ir783-job-object-kill-on-close

Conversation

@kreneskyp

@kreneskyp kreneskyp commented Oct 14, 2026 •

Copy link
Copy Markdown

Refs IR-783.

Add a safe std KillOnDrop marker that opts a Windows JobObject into kill-on-close. Keep the existing std behavior unchanged when the marker is absent; the existing suspended spawn, job assignment, and resume sequence remains in place. The option works in either wrapper registration order.

The Windows integration tests check default behavior, opt-in termination of a child and descendant when the wrapper is dropped, and that failed job assignment terminates the suspended child before its marker command runs.

Local macOS checks:

  • cargo fmt --check passed.
  • cargo test --locked --features std --all-targets passed (55 tests).
  • cargo test --locked --no-default-features --features std --all-targets passed (31 tests).
  • cargo test --locked --all-features --all-targets passed.
  • cargo clippy --locked --features std passed with an existing unused-import warning in src/std/core.rs.
  • cargo check --locked --no-default-features --lib passed.
  • The workflow multiprocess helper passed with one child.
  • Windows std_windows test target cross-compiles with rustup stable on macOS; this is compile evidence, not runtime execution.

Native Windows execution and CI are pending.

@kreneskyp
kreneskyp marked this pull request as ready for review October 14, 2026 20:03
@passcod

passcod commented Oct 15, 2026

Copy link
Copy Markdown
Member

From other PRs by account this appears to be fully-automated AI submissions. Come back with a human touch.

@passcod passcod closed this Oct 15, 2026
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.

2 participants