Implement reaper with runc support in shim

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2017-03-09 16:11:57 -08:00
parent df48983fe7
commit 9f3240364f
3 changed files with 9 additions and 5 deletions

View file

@ -11,7 +11,7 @@ import (
// Reap should be called when the process receives an SIGCHLD. Reap will reap
// all exited processes and close their wait channels
func Reap() error {
func Reap() ([]utils.Exit, error) {
exits, err := utils.Reap(false)
for _, e := range exits {
Default.mu.Lock()
@ -28,7 +28,7 @@ func Reap() error {
delete(Default.cmds, e.Pid)
Default.mu.Unlock()
}
return err
return exits, err
}
var Default = &Monitor{