Move reaper under shim package

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2018-05-22 11:38:20 -04:00
parent cff5e75df8
commit 0bafe236b4
6 changed files with 11 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ import (
"os"
"os/signal"
"github.com/containerd/containerd/reaper"
"github.com/containerd/containerd/linux/shim"
runc "github.com/containerd/go-runc"
"github.com/opencontainers/runc/libcontainer/system"
"github.com/stevvooe/ttrpc"
@@ -34,7 +34,7 @@ func setupSignals() (chan os.Signal, error) {
signal.Notify(signals, unix.SIGTERM, unix.SIGINT, unix.SIGCHLD, unix.SIGPIPE)
// make sure runc is setup to use the monitor
// for waiting on processes
runc.Monitor = reaper.Default
runc.Monitor = shim.Default
// set the shim as the subreaper for all orphaned processes created by the container
if err := system.SetSubreaper(1); err != nil {
return nil, err