Files
containerd/cmd/containerd/main_windows.go
Michael Crosby 003ad67375 Move platformInit and plugin load to server
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-23 12:06:31 -07:00

28 lines
544 B
Go

package main
import (
"context"
"os"
"path/filepath"
"syscall"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/server"
)
var (
defaultConfigPath = filepath.Join(os.Getenv("programfiles"), "containerd", "config.toml")
handledSignals = []os.Signal{
syscall.SIGTERM,
syscall.SIGINT,
}
)
func handleSignals(ctx context.Context, signals chan os.Signal, server *server.Server) error {
for s := range signals {
log.G(ctx).WithField("signal", s).Debug("received signal")
server.Stop()
}
return nil
}