Merge pull request #4228 from thaJeztah/refactor_reaper

Refactor reaper-related functionality to be in the sys/reaper package
This commit is contained in:
Phil Estes
2020-05-07 14:32:55 -04:00
committed by GitHub
5 changed files with 53 additions and 90 deletions

View File

@@ -20,7 +20,6 @@ import (
"os"
"os/signal"
"github.com/containerd/containerd/sys"
"github.com/containerd/containerd/sys/reaper"
runc "github.com/containerd/go-runc"
"github.com/containerd/ttrpc"
@@ -36,7 +35,7 @@ func setupSignals() (chan os.Signal, error) {
// for waiting on processes
runc.Monitor = reaper.Default
// set the shim as the subreaper for all orphaned processes created by the container
if err := sys.SetSubreaper(1); err != nil {
if err := reaper.SetSubreaper(1); err != nil {
return nil, err
}
return signals, nil