mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 22:44:24 +00:00
Fixed --wait
This commit is contained in:
+10
-2
@@ -165,8 +165,16 @@ func RunProcess(wait bool, label string, execPath string, args []string, input s
|
||||
}
|
||||
|
||||
if wait {
|
||||
exitErr := pcm.Wait(proc)
|
||||
return nil, exitErr
|
||||
<-proc.WaitCh
|
||||
if proc.ExitState == nil {
|
||||
return &ResponseRunProcess{
|
||||
Success: true,
|
||||
}, nil
|
||||
} else {
|
||||
return &ResponseRunProcess{
|
||||
Success: proc.ExitState.Success(), // Would be always false?
|
||||
}, nil
|
||||
}
|
||||
} else {
|
||||
return &ResponseRunProcess{}, nil
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ type ResponseStatus struct {
|
||||
}
|
||||
|
||||
type ResponseRunProcess struct {
|
||||
Success bool
|
||||
}
|
||||
|
||||
type ResponseStopProcess struct {
|
||||
|
||||
Reference in New Issue
Block a user