Documentation
¶
Overview ¶
Package reaper contains logic for reaping subprocesses. It is specifically used in the agent to avoid the accumulation of zombie processes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForkReap ¶
func ForkReap(pids reap.PidCh) error
ForkReap spawns a goroutine that reaps children. In order to avoid complications with spawning `exec.Commands` in the same process that is reaping, we forkexec a child process. This prevents a race between the reaper and an exec.Command waiting for its process to complete. The provided 'pids' channel may be nil if the caller does not care about the reaped children PIDs.
func IsInitProcess ¶
func IsInitProcess() bool
IsInitProcess returns true if the current process's PID is 1.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.