summaryrefslogtreecommitdiff
path: root/cmd/dockerd/trap/trap.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/dockerd/trap/trap.go')
-rw-r--r--cmd/dockerd/trap/trap.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/cmd/dockerd/trap/trap.go b/cmd/dockerd/trap/trap.go
index 1e88e66302..62cbfaf1ca 100644
--- a/cmd/dockerd/trap/trap.go
+++ b/cmd/dockerd/trap/trap.go
@@ -15,22 +15,15 @@ import (
// - If SIGINT or SIGTERM are received, `cleanup` is called, then the process is terminated.
// - If SIGINT or SIGTERM are received 3 times before cleanup is complete, then cleanup is
// skipped and the process is terminated immediately (allows force quit of stuck daemon)
-// - Ignore SIGPIPE events. These are generated by systemd when journald is restarted while
-// the docker daemon is not restarted and also running under systemd.
-// Fixes https://github.com/docker/docker/issues/19728
func Trap(cleanup func(), logger interface {
Info(args ...interface{})
}) {
c := make(chan os.Signal, 1)
- // we will handle INT, TERM, SIGPIPE here
- signal.Notify(c, os.Interrupt, syscall.SIGTERM, syscall.SIGPIPE)
+ // we will handle INT, TERM here
+ signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
interruptCount := uint32(0)
for sig := range c {
- if sig == syscall.SIGPIPE {
- continue
- }
-
go func(sig os.Signal) {
logger.Info(fmt.Sprintf("Processing signal '%v'", sig))
switch sig {