mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-16 16:36:53 +08:00
fix(ecc2): resolve kill_process duplicate definition on Windows (#2195)
On Windows both cfg(windows) and cfg(not(unix)) evaluate true, so the sync taskkill kill_process and the async taskkill kill_process both compiled in and collided (E0428). Call sites are synchronous and never await it (passed as a fn pointer to enforce_session_heartbeats_with, and called as kill_process(pid)? in stop_session_recorded), so remove the stray async cfg(not(unix)) definition. The sync cfg(windows) version already handles termination via taskkill /T /F.
This commit is contained in:
parent
2b393c3ce1
commit
0ce14a423c
@ -3634,24 +3634,6 @@ fn send_signal(pid: u32, signal: i32) -> Result<()> {
|
||||
Err(error).with_context(|| format!("Failed to kill process {pid}"))
|
||||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
async fn kill_process(pid: u32) -> Result<()> {
|
||||
let status = Command::new("taskkill")
|
||||
.args(["/F", "/PID", &pid.to_string()])
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
.stderr(Stdio::null())
|
||||
.status()
|
||||
.await
|
||||
.with_context(|| format!("Failed to invoke taskkill for process {pid}"))?;
|
||||
|
||||
if status.success() {
|
||||
Ok(())
|
||||
} else {
|
||||
anyhow::bail!("taskkill failed for process {pid}");
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SessionStatus {
|
||||
harness: SessionHarnessInfo,
|
||||
profile: Option<SessionAgentProfile>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user