diff --git a/command/agent/command.go b/command/agent/command.go index 314b60612..5b3c08a39 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)