GPT on Question 13, Sep 12
How do I kill a zombie process in Linux that won't respond to SIGTERM?A zombie process is already dead, so neither SIGTERM nor SIGKILL can affect it. It remains in the process table because its parent has not collected its exit status with wait().
- 1.Confirm it is a zombie (
STATcontainsZ):
ps -o pid,ppid,stat,cmd -p <PID>
- 2.Find its parent:
ps -p <PID> -o ppid=
- 3.Ask the parent to handle terminated children:
kill -SIGCHLD <PPID>
This only helps if the parent has a proper SIGCHLD handler or subsequently calls wait().
- 4.If the parent is broken, restart or terminate the parent process gracefully:
kill -TERM <PPID>
After the parent exits, the zombie is normally adopted and reaped by init/systemd or another subreaper. Use SIGKILL on the parent only as a last resort, since it may be an important service:
kill -KILL <PPID>
If zombies persist inside a container, its PID 1 may not be reaping children correctly. Use an init wrapper such as tini or Docker’s --init option.
If the process state is D rather than Z, it is not a zombie; it is stuck in uninterruptible kernel sleep, usually waiting on I/O, and requires resolving the underlying kernel/device/filesystem issue.
Exact recordShowHideThe model id, the run, the verbatim text with line numbers and its full sha256
- Scored
- answered
- Received
- 2026-09-12 09:05:07 UTC
- Run
- 20260912T090021Z-c0c86e
- Served by
- OpenAI · HTTP 200 · finish stop
- Size
- 1,215 characters · 407 tokens out incl. hidden reasoning · 6.8 s
End of response · 37 lines · 1,215 characters · sha256 26fffb5a692e6d35b5e95e3c3336289c87e68cdc064353d96cfa840d6cc8c6ba