Add SIGPIPE signal handler to the signals package (#689)

By default raised SIGPIPE signal will cause the program to exit immediately[1]
and bypass any shutdown logic.

Add syscall.SIGPIPE to the signals we get notified to disable this behavior.

[1] https://golang.org/pkg/os/signal/#hdr-SIGPIPE

Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
This commit is contained in:
Slavomir Kaslev 2019-09-19 05:27:48 +03:00 committed by Knative Prow Robot
parent ba7564872c
commit 1fb9a43308
1 changed files with 1 additions and 1 deletions

View File

@ -23,4 +23,4 @@ import (
"syscall"
)
var shutdownSignals = []os.Signal{os.Interrupt, syscall.SIGTERM}
var shutdownSignals = []os.Signal{os.Interrupt, syscall.SIGTERM, syscall.SIGPIPE}