defunct process fix

This commit is contained in:
Saxon Milton 2018-05-07 14:21:11 +09:30
parent 5b5d17ee87
commit 3f49f56ec5
1 changed files with 1 additions and 12 deletions

View File

@ -632,18 +632,7 @@ func (r *revid) setupInputForRaspivid() error {
)
}
stdout, _ := r.cmd.StdoutPipe()
err := r.cmd.Start()
if err != nil {
for i := 0; i < raspividNoOfTries; i++ {
r.Log(Error, err.Error())
err = r.cmd.Start()
if err == nil {
goto raspividSuccess
}
}
return err
}
raspividSuccess:
go r.cmd.Run()
r.inputReader = bufio.NewReader(stdout)
go r.readCamera()
return nil