rust-lang / rust-lang/rust-clippy

zombie_processes doesn't catch an immediately discarded spawned child

Open
#17,692 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.