ctr: move signals to commands package
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
gocontext "context"
|
||||
"fmt"
|
||||
"runtime"
|
||||
"syscall"
|
||||
|
||||
"github.com/containerd/console"
|
||||
"github.com/containerd/containerd"
|
||||
@@ -20,10 +19,6 @@ type resizer interface {
|
||||
Resize(ctx gocontext.Context, w, h uint32) error
|
||||
}
|
||||
|
||||
type killer interface {
|
||||
Kill(gocontext.Context, syscall.Signal, ...containerd.KillOpts) error
|
||||
}
|
||||
|
||||
func withEnv(context *cli.Context) containerd.SpecOpts {
|
||||
return func(_ gocontext.Context, _ *containerd.Client, _ *containers.Container, s *specs.Spec) error {
|
||||
env := context.StringSlice("env")
|
||||
@@ -160,8 +155,8 @@ var runCommand = cli.Command{
|
||||
logrus.WithError(err).Error("console resize")
|
||||
}
|
||||
} else {
|
||||
sigc := forwardAllSignals(ctx, task)
|
||||
defer stopCatch(sigc)
|
||||
sigc := commands.ForwardAllSignals(ctx, task)
|
||||
defer commands.StopCatch(sigc)
|
||||
}
|
||||
status := <-statusC
|
||||
code, _, err := status.Result()
|
||||
|
||||
Reference in New Issue
Block a user