From 96f871862e72e80a59dfb1031b91343873994942 Mon Sep 17 00:00:00 2001 From: James Nugent Date: Tue, 10 Apr 2018 20:44:50 -0500 Subject: [PATCH] Only call signal.Notify once during agent startup Calling twice appears to have no adverse effects, however serves to confuse as to what the semantics of such code may be! This seems like it was probably introduced while resolving conflicts during the merge of the fix for #2404. --- command/agent/agent.go | 1 - 1 file changed, 1 deletion(-) diff --git a/command/agent/agent.go b/command/agent/agent.go index 40bfbef20c..068b3014ee 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -385,7 +385,6 @@ func (c *cmd) run(args []string) int { // wait for signal signalCh := make(chan os.Signal, 10) - signal.Notify(signalCh, os.Interrupt, syscall.SIGTERM, syscall.SIGHUP) signal.Notify(signalCh, os.Interrupt, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGPIPE) for {