Skip to content

Isolate daemon environments and expose PID-safe tree kill - #653

Merged
zackees merged 1 commit into
mainfrom
feat/auto-daemon-env
Jul 23, 2026
Merged

Isolate daemon environments and expose PID-safe tree kill#653
zackees merged 1 commit into
mainfrom
feat/auto-daemon-env

Conversation

@zackees

@zackees zackees commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • add EnvironmentPolicy::{Auto, Inherit, UserBaseline, Clear} to contained and detached spawn APIs
  • make Auto inherit for contained children and build a fresh Windows user baseline for detached daemons
  • expose local process_tree::kill_tree(pid, timeout) without requiring the daemon
  • identify targets by PID plus creation time and reject stale PPID relationships after PID reuse
  • route running-process's own daemon launch paths and RPC kill-tree handler through the new APIs

Safety boundary

Windows does not expose a supported readback API for the original CreateProcess creation flags of an arbitrary process. This change therefore does not infer daemon intent or broadly reap detached-looking processes. It supplies explicit spawn policy plus a PID-instance-safe tree-kill primitive for callers that already have lifecycle ownership.

Validation

  • soldr cargo test -p running-process --lib --no-default-features environment -- --test-threads=1
  • soldr cargo test -p running-process --test containment_test test_auto -- --test-threads=1
  • soldr cargo test -p running-process --test containment_test test_local_kill_tree -- --test-threads=1
  • soldr cargo check -p running-process --all-features --lib
  • git diff --check

soldr cargo fmt --all -- --check is already red on unchanged origin/main files under the current toolchain; all touched Rust files were formatted individually.

@zackees
zackees marked this pull request as ready for review July 23, 2026 23:28
@zackees
zackees merged commit 41c1b53 into main Jul 23, 2026
77 of 82 checks passed
@zackees
zackees deleted the feat/auto-daemon-env branch July 23, 2026 23:33
@zackees

zackees commented Jul 24, 2026

Copy link
Copy Markdown
Owner Author

Consumer rollouts: zackees/soldr#1793, FastLED/fbuild#1169, and zackees/zccache#1192.

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