reaper

package
v0.6.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package reaper implements zombie process reaper with notifications.

Index

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 Run

func Run()

Run launches loop for the zombie process reaper.

func Shutdown

func Shutdown()

Shutdown stops the process reaper.

func Stop

func Stop(ch chan<- ProcessInfo)

Stop sending notifications to the channel.

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 ProcessInfo

type ProcessInfo struct {
	Pid    int
	Status syscall.WaitStatus
}

ProcessInfo describes reaped zombie process.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL