From 46493d8670079e406b5991fd7d3915c3727d6f57 Mon Sep 17 00:00:00 2001 From: Max Timchenko Date: Wed, 15 Nov 2017 18:01:41 +0200 Subject: [PATCH] Do not emit logs on SIGPIPE since logging service could be unavailable This should fix https://github.com/hashicorp/nomad/issues/3554 --- command/agent/command.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/command/agent/command.go b/command/agent/command.go index 9966b278cb0..319ce95f74f 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -548,13 +548,14 @@ WAIT: case <-c.retryJoinErrCh: return 1 } - c.Ui.Output(fmt.Sprintf("Caught signal: %v", sig)) - // Skip any SIGPIPE signal (See issue #1798) + // Skip any SIGPIPE signal and don't try to log it (See issues #1798, #3554) if sig == syscall.SIGPIPE { goto WAIT } + c.Ui.Output(fmt.Sprintf("Caught signal: %v", sig)) + // Check if this is a SIGHUP if sig == syscall.SIGHUP { c.handleReload()