package reaper
import "github.com/containerd/containerd/sys/reaper"
Index ¶
- Variables
- func Reap() 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)
Variables ¶
Default is the default monitor initialized for the package
ErrNoSuchProcess is returned when the process no longer exists
Functions ¶
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
Types ¶
type Monitor ¶
Monitor monitors the underlying system for process status changes
func (*Monitor) Start ¶
Start starts the command and registers the process with the reaper
func (*Monitor) Subscribe ¶
Subscribe to process exit changes
func (*Monitor) Unsubscribe ¶
Unsubscribe to process exit changes
func (*Monitor) Wait ¶
Wait blocks until a process is signal as dead. User should rely on the value of the exit status to determine if the command was successful or not.
func (*Monitor) WaitTimeout ¶
WaitTimeout is used to skip the blocked command and kill the left process.
Source Files ¶
- Version
- v1.7.13
- Published
- Jan 31, 2024
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 3 minutes ago –
Tools for package owners.