Skip to content

Commit

Permalink
Merge pull request #2842 from vaLski/supress_sigpipe_logging
Browse files Browse the repository at this point in the history
Supress signal logging on SIGPIPE. Should address #2768
  • Loading branch information
slackpad authored Apr 13, 2017
2 parents d549c9c + 1e5163d commit fb089e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions command/agent/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fb089e2

Please sign in to comment.