phantom start daemonizes the proxy using CommandExt::process_group(0) — Unix-only syscall.
Location
phantom-cli/src/commands/start.rs:52-57
Fix
Gate the existing code with #[cfg(unix)]. Add #[cfg(windows)] path using Windows creation flags so the proxy survives the parent's exit:
use std::os::windows::process::CommandExt;
const DETACHED_PROCESS: u32 = 0x00000008;
const CREATE_NO_WINDOW: u32 = 0x08000000;
cmd.creation_flags(DETACHED_PROCESS | CREATE_NO_WINDOW);
Also verify the PID-file lock handling still works — Windows does not recycle PIDs the same way Linux does, so the stale-PID check may need adjustment.
Severity
Functional gap — phantom start will not run detached on Windows.
Tracker: #1
phantom startdaemonizes the proxy usingCommandExt::process_group(0)— Unix-only syscall.Location
phantom-cli/src/commands/start.rs:52-57Fix
Gate the existing code with
#[cfg(unix)]. Add#[cfg(windows)]path using Windows creation flags so the proxy survives the parent's exit:Also verify the PID-file lock handling still works — Windows does not recycle PIDs the same way Linux does, so the stale-PID check may need adjustment.
Severity
Functional gap —
phantom startwill not run detached on Windows.Tracker: #1