mirror of https://github.com/status-im/consul.git
Merge pull request #2842 from vaLski/supress_sigpipe_logging
Supress signal logging on SIGPIPE. Should address #2768
This commit is contained in:
commit
fb089e2bbb
|
@ -1171,13 +1171,14 @@ WAIT:
|
||||||
// Agent is already shutdown!
|
// Agent is already shutdown!
|
||||||
return 0
|
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 {
|
if sig == syscall.SIGPIPE {
|
||||||
goto WAIT
|
goto WAIT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c.Ui.Output(fmt.Sprintf("Caught signal: %v", sig))
|
||||||
|
|
||||||
// Check if this is a SIGHUP
|
// Check if this is a SIGHUP
|
||||||
if sig == syscall.SIGHUP {
|
if sig == syscall.SIGHUP {
|
||||||
conf, err := c.handleReload(config)
|
conf, err := c.handleReload(config)
|
||||||
|
|
Loading…
Reference in New Issue