diff --git a/cmd/crio/daemon_unsupported.go b/cmd/crio/daemon_unsupported.go new file mode 100644 index 00000000..fb5f9b2e --- /dev/null +++ b/cmd/crio/daemon_unsupported.go @@ -0,0 +1,7 @@ +// +build !linux + +package main + +func notifySystem() { + // nothin' doin' +} diff --git a/cmd/crio/main.go b/cmd/crio/main.go index f27ab374..fa68f21c 100644 --- a/cmd/crio/main.go +++ b/cmd/crio/main.go @@ -11,6 +11,7 @@ import ( "path/filepath" "sort" "strings" + "syscall" "time" "github.com/containers/storage/pkg/reexec" @@ -20,7 +21,6 @@ import ( "github.com/sirupsen/logrus" "github.com/soheilhy/cmux" "github.com/urfave/cli" - "golang.org/x/sys/unix" "google.golang.org/grpc" runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2" ) @@ -148,13 +148,13 @@ func mergeConfig(config *server.Config, ctx *cli.Context) error { func catchShutdown(gserver *grpc.Server, sserver *server.Server, hserver *http.Server, signalled *bool) { sig := make(chan os.Signal, 10) - signal.Notify(sig, unix.SIGINT, unix.SIGTERM) + signal.Notify(sig, syscall.SIGINT, syscall.SIGTERM) go func() { for s := range sig { switch s { - case unix.SIGINT: + case syscall.SIGINT: logrus.Debugf("Caught SIGINT") - case unix.SIGTERM: + case syscall.SIGTERM: logrus.Debugf("Caught SIGTERM") default: continue