From e80d1a58fb7e7ec44c4a12ca7c7de86d65547918 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Tue, 22 Dec 2015 10:29:55 -0800 Subject: [PATCH] Moves logger down where it's used for reaping. --- command/agent/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/command.go b/command/agent/command.go index 314b60612d..5b3c08a394 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -644,11 +644,11 @@ func (c *Command) Run(args []string) int { // Enable child process reaping if (config.Reap != nil && *config.Reap) || (config.Reap == nil && os.Getpid() == 1) { - logger := c.agent.logger if !reap.IsSupported() { c.Ui.Error("Child process reaping is not supported on this platform (set reap=false)") return 1 } else { + logger := c.agent.logger logger.Printf("[DEBUG] Automatically reaping child processes") pids := make(reap.PidCh, 1)