From dad7e06238f2d2688efe08c8ca57391fc98efacc Mon Sep 17 00:00:00 2001 From: Phil Estes Date: Tue, 11 Jul 2017 14:51:56 -0400 Subject: [PATCH] Ignore SIGPIPE Similar to code in the Docker daemon and containerd 0.2.x. Even if we have a better deployment model in containerd 1.0 seems reasonable to have this same fix in the rare case that it bites someone using containerd 1.0. Signed-off-by: Phil Estes --- cmd/containerd/main_unix.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/containerd/main_unix.go b/cmd/containerd/main_unix.go index 09bb41645..6fcf8de63 100644 --- a/cmd/containerd/main_unix.go +++ b/cmd/containerd/main_unix.go @@ -20,6 +20,7 @@ var handledSignals = []os.Signal{ unix.SIGINT, unix.SIGUSR1, unix.SIGCHLD, + unix.SIGPIPE, } func handleSignals(ctx context.Context, signals chan os.Signal, server *server.Server) error { @@ -32,6 +33,8 @@ func handleSignals(ctx context.Context, signals chan os.Signal, server *server.S } case unix.SIGUSR1: dumpStacks() + case unix.SIGPIPE: + continue default: server.Stop() return nil