Merge pull request #2842 from vaLski/supress_sigpipe_logging

Supress signal logging on SIGPIPE. Should address #2768
This commit is contained in:
James Phillips 2017-04-13 16:52:29 -07:00 committed by GitHub
commit fb089e2bbb
1 changed files with 3 additions and 2 deletions

View File

@ -1171,13 +1171,14 @@ WAIT:
// Agent is already shutdown!
return 0
}
c.Ui.Output(fmt.Sprintf("Caught signal: %v", sig))
// Skip SIGPIPE signals
// Skip SIGPIPE signals and skip logging whenever such signal is received as well
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 {
conf, err := c.handleReload(config)