Repair Child Process Reaping Bugs

    by Mariusz Wrzeszczynski

    1

    Repair zombie children, kill-without-wait paths, double wait races, orphaned descendants, blocked subprocess pipes, and shutdown hangs.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLI+17 more

    See it in action

    You say

    Our Python worker launches ffmpeg with subprocess.Popen, captures stdout/stderr, and has a 30-second timeout. On timeout we call terminate() and raise, but we do not always call wait(). After many jobs the Linux host shows defunct ffmpeg children, and occasionally helper descendants survive. Repair the wrapper with local fake child programs and deterministic tests. Do not kill any production PID, change the timeout value, or assume one signal reaches every descendant.

    Your agent does

    Subprocess lifecycle bug found. Timeout and shutdown compete for wait/reap ownership. The repair gives one child finalizer exclusive Wait responsibility, coordinates pipe cleanup, and preserves existing exit semantics.

    What you get

    Prevent zombie processes by ensuring every spawn has a dedicated reap owner.Resolve shutdown deadlocks caused by unclosed stdout/stderr pipes.Fix race conditions where multiple goroutines or tasks attempt to Wait on one child.Implement safe process-group cleanup to prevent orphaned descendants.

    About this skill

    Subprocess cleanup is more than sending a kill signal. A child can exit and remain unreaped, multiple paths can compete to Wait, descendants can keep pipes open, and shutdown can hang when no path owns the full child lifecycle.

    Repair Child Process Reaping Bugs maps spawn, termination, wait/reap, process-group scope, and pipe ownership; introduces one lifecycle owner; and proves cleanup with disposable fake child programs.

    It never targets production PIDs or invents unsupported host/process-group policy.

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    Listedtoday

    Frequently Asked Questions

    Popular in Testing & QA