mirror of https://github.com/hashicorp/consul
commit
066e772536
|
@ -282,13 +282,14 @@ func (c *LockCommand) startChild(script string, doneCh chan struct{}) error {
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
|
|
||||||
// Start the child process
|
// Start the child process
|
||||||
|
c.childLock.Lock()
|
||||||
if err := cmd.Start(); err != nil {
|
if err := cmd.Start(); err != nil {
|
||||||
c.Ui.Error(fmt.Sprintf("Error starting handler: %s", err))
|
c.Ui.Error(fmt.Sprintf("Error starting handler: %s", err))
|
||||||
|
c.childLock.Unlock()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup the child info
|
// Setup the child info
|
||||||
c.childLock.Lock()
|
|
||||||
c.child = cmd.Process
|
c.child = cmd.Process
|
||||||
c.childLock.Unlock()
|
c.childLock.Unlock()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue