Documentation ¶
Index ¶
- Variables
- func GetSubreaper() (int, error)
- func Reap() error
- func SetSubreaper(i int) error
- type Monitor
- func (m *Monitor) Start(c *exec.Cmd) (chan runc.Exit, error)
- func (m *Monitor) Subscribe() chan runc.Exit
- func (m *Monitor) Unsubscribe(c chan runc.Exit)
- func (m *Monitor) Wait(c *exec.Cmd, ec chan runc.Exit) (int, error)
- func (m *Monitor) WaitTimeout(c *exec.Cmd, ec chan runc.Exit, timeout time.Duration) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = &Monitor{ subscribers: make(map[chan runc.Exit]*subscriber), }
Default is the default monitor initialized for the package
View Source
var ErrNoSuchProcess = errors.New("no such process")
ErrNoSuchProcess is returned when the process no longer exists
Functions ¶
func GetSubreaper ¶ added in v1.4.0
GetSubreaper returns the subreaper setting for the calling process
func Reap ¶
func Reap() error
Reap should be called when the process receives an SIGCHLD. Reap will reap all exited processes and close their wait channels
func SetSubreaper ¶ added in v1.4.0
SetSubreaper sets the value i as the subreaper setting for the calling process
Types ¶
type Monitor ¶
Monitor monitors the underlying system for process status changes
func (*Monitor) Unsubscribe ¶
Unsubscribe to process exit changes
Click to show internal directories.
Click to hide internal directories.