rust-lang / rust-lang/rust-clippy
zombie_processes doesn't catch an immediately discarded spawned child
Open
@JackFurton is already working on this.
Since Sep 7, 2026.
C-bug
I-false-negative
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Summary
so clippy is unable to catch this case in the reproduction, but I feel like it should?
Lint Name
zombie_processes
Reproducer
I tried this code:
fn main() {
let _ = std::process::Command::new("true").spawn();
std::thread::sleep(std::time::Duration::from_secs(30));
}
I expected to see this happen:
should catch a zombie_process
Instead, this happened:
no zombie process
Version
rustc 1.94.1 (e408947bf 2026-03-25)
binary: rustc
commit-hash: e408947bfd200af42db322daf0fadfe7e26d3bd1
commit-date: 2026-03-25
host: x86_64-unknown-linux-gnu
release: 1.94.1
LLVM version: 21.1.8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.