Remove unnecessary subreaper API from sys/

Given these same exact functions are both now available in
opencontainers/runc (libcontainer/system) package, and we only use the
`SetSubreaper` today from the shim, there seems to be no reason for
duplication.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes
2018-01-23 10:30:29 -05:00
parent dc5964ccc2
commit f47f6af585
2 changed files with 2 additions and 43 deletions

View File

@@ -6,8 +6,8 @@ import (
"syscall"
"github.com/containerd/containerd/reaper"
"github.com/containerd/containerd/sys"
runc "github.com/containerd/go-runc"
"github.com/opencontainers/runc/libcontainer/system"
"github.com/stevvooe/ttrpc"
)
@@ -20,7 +20,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 := system.SetSubreaper(1); err != nil {
return nil, err
}
return signals, nil