From e96b2b8d09c069dc06cda89b7e3c233595b8c3f9 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 40bfbef20..068b3014e 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 {