Skip to content

cli: add Windows taskkill path for phantom stop #4

@MasonStation

Description

@MasonStation

phantom stop shells out to kill to terminate the proxy daemon. Windows has no kill command.

Location

  • phantom-cli/src/commands/stop.rs:21

Fix

Gate the existing Unix code with #[cfg(unix)]. Add a #[cfg(windows)] path using taskkill:

#[cfg(windows)]
Command::new("taskkill").args(["/PID", &pid.to_string(), "/F"]).status()?;

Alternative: use the sysinfo crate for a pure-Rust solution that works on both platforms.

Severity

Blockerphantom stop fails on Windows.

Tracker: #1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindowsWindows platform support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions