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 <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes 2017-07-11 14:51:56 -04:00
parent 106c7504f4
commit dad7e06238
No known key found for this signature in database
GPG Key ID: 0F386284C03A1162

View File

@ -20,6 +20,7 @@ var handledSignals = []os.Signal{
unix.SIGINT, unix.SIGINT,
unix.SIGUSR1, unix.SIGUSR1,
unix.SIGCHLD, unix.SIGCHLD,
unix.SIGPIPE,
} }
func handleSignals(ctx context.Context, signals chan os.Signal, server *server.Server) error { 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: case unix.SIGUSR1:
dumpStacks() dumpStacks()
case unix.SIGPIPE:
continue
default: default:
server.Stop() server.Stop()
return nil return nil