mirror of https://github.com/status-im/consul.git
Moves logger down where it's used for reaping.
This commit is contained in:
parent
0b1c346990
commit
e80d1a58fb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue