main: some last platform indepent calls

This commit is contained in:
Vincent Batts 2018-01-29 04:03:31 -05:00
parent cc39203b09
commit e937df1a07
2 changed files with 11 additions and 4 deletions

View file

@ -0,0 +1,7 @@
// +build !linux
package main
func notifySystem() {
// nothin' doin'
}

View file

@ -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