Documentation
¶
Overview ¶
Package reaper implements zombie process reaper with notifications.
Index ¶
- func Notify(ch chan<- ProcessInfo) bool
- func ProcessWaitWrapper(usingReaper bool, notifyCh <-chan ProcessInfo, proc *os.Process) error
- func Run()
- func Shutdown()
- func Stop(ch chan<- ProcessInfo)
- func WaitWrapper(usingReaper bool, notifyCh <-chan ProcessInfo, cmd *exec.Cmd) error
- type ExitError
- type ProcessInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Notify ¶
func Notify(ch chan<- ProcessInfo) bool
Notify causes reaper to deliver notifications about reaped zombies.
If Notify returns false, reaper is not running, and Notify does nothing.
func ProcessWaitWrapper ¶ added in v0.1.2
func ProcessWaitWrapper(usingReaper bool, notifyCh <-chan ProcessInfo, proc *os.Process) error
ProcessWaitWrapper emulates os/exec.Process.Wait() when reaper is running. It is equivalent to WaitWrapper
ProcessWaitWrapper(true, proc) should be equivalent to proc.Wait().
func WaitWrapper ¶
func WaitWrapper(usingReaper bool, notifyCh <-chan ProcessInfo, cmd *exec.Cmd) error
WaitWrapper emulates os/exec.Command.Wait() when reaper is running.
WaitWrapper(true, cmd) should be equivalent to cmd.Wait().
Types ¶
type ExitError ¶
type ExitError struct {
ExitCode int
}
ExitError is raised when exit status is not equal to 0.
type ProcessInfo ¶
type ProcessInfo struct { Pid int Status syscall.WaitStatus }
ProcessInfo describes reaped zombie process.
Click to show internal directories.
Click to hide internal directories.