Moves logger down where it's used for reaping.

This commit is contained in:
James Phillips 2015-12-22 10:29:55 -08:00
parent e1d456a079
commit d71036c4f0
1 changed files with 1 additions and 1 deletions

View File

@ -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)