Skip to content

chore: daemon restart leaks raw "kill: ... No such process" noise for an already-expected race - #771

Merged
getappz merged 1 commit into
masterfrom
task/284-daemon-restart-leaks-raw-kill-no-such-pr
Sep 18, 2026
Merged

getappz merged 1 commit into
masterfrom
task/284-daemon-restart-leaks-raw-kill-no-such-pr

Conversation

@getappz

@getappz getappz commented Sep 18, 2026

Copy link
Copy Markdown
Owner

No hits — confirms zero clippy findings in src/ipc/process.rs.

Summary

Fixed src/ipc/process.rs (is_alive, terminate_gracefully, force_kill): added .stdout(Stdio::null()).stderr(Stdio::null()) to the three non-Windows kill Command invocations. Previously Command::status() inherited stderr, so a stale-PID kill (e.g. "No such process") leaked to the user's terminal even though every caller already discards the outcome (let _ = ...). Behavior of the returned Result/exit status is unchanged — only child stdio is now suppressed, matching the Windows branches which already went through flare_process::command.

Verified:

  • cargo build --lib — clean.
  • cargo test (workspace) — all 1893 tests pass, including the 4 ipc::process::tests::parse_other_pids_* tests.
  • Manual repro: confirmed kill -0 on a dead PID prints kill: sending signal to <pid> failed: No such process to stderr without the redirect, and prints nothing with the added .stdout/.stderr(Stdio::null()) — exit status (false) unchanged.
  • cargo clippy -p agentflare --lib — clean for this crate (no warnings touching ipc/process.rs); a workspace-wide clippy run does hit pre-existing errors in unrelated crates/agent-registry, not caused by this change.

No concerns.


Opened by claude-code on flared:51bb8de6c33b for item #284 via agentflare.

## Summary

Fixed `src/ipc/process.rs` (`is_alive`, `terminate_gracefully`, `force_kill`): added `.stdout(Stdio::null()).stderr(Stdio::null())` to the three non-Windows `kill` `Command` invocations. Previously `Command::status()` inherited stderr, so a stale-PID `kill` (e.g. "No such process") leaked to the user's terminal even though every caller already discards the outcome (`let _ = ...`). Behavior of the returned `Result`/exit status is unchanged — only child stdio is now suppressed, matching the Windows branches which already went through `flare_process::command`.

Verified:
- `cargo build --lib` — clean.
- `cargo test` (workspace) — all 1893 tests pass, including the 4 `ipc::process::tests::parse_other_pids_*` tests.
- Manual repro: confirmed `kill -0` on a dead PID prints `kill: sending signal to <pid> failed: No such process` to stderr without the redirect, and prints nothing with the added `.stdout/.stderr(Stdio::null())` — exit status (`false`) unchanged.
- `cargo clippy -p agentflare --lib` — clean for this crate (no warnings touching `ipc/process.rs`); a workspace-wide clippy run does hit pre-existing errors in unrelated `crates/agent-registry`, not caused by this change.

No concerns.

Agentflare-Branch: task/284-daemon-restart-leaks-raw-kill-no-such-pr
Agentflare-Item: 284
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: 6075cf73-b974-408f-9444-2b28fb31e02b

📥 Commits

Reviewing files that changed from the base of the PR and between 00388fb and 67b7dc1.

📒 Files selected for processing (1)
  • src/ipc/process.rs

Comment @coderabbitai help to get the list of available commands.

@getappz
getappz merged commit b04b248 into master Sep 18, 2026
17 checks passed
@getappz
getappz deleted the task/284-daemon-restart-leaks-raw-kill-no-such-pr branch September 18, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant