Documentation
¶
Overview ¶
Package reaper provides a background zombie process reaper.
When a Go process runs as PID 1 (e.g. inside a container), it inherits orphaned child processes. If those children exit without being waited on, they accumulate as zombies. This package periodically calls waitpid(-1) with WNOHANG to reap any such zombies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
Start launches a background goroutine that reaps zombie child processes. It only activates when the current process is PID 1. The goroutine exits when ctx is cancelled.
func StartForTest ¶
StartForTest is like Start but skips the PID 1 check.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.