check to see if backend server dies
This commit is contained in:
parent
52e35b2ca4
commit
f8eefd5c72
|
@ -100,7 +100,7 @@ func backendServer() {
|
||||||
srv.Accept(lis)
|
srv.Accept(lis)
|
||||||
}
|
}
|
||||||
|
|
||||||
func startBackendServer() {
|
func runBackendServer() {
|
||||||
proc := exec.Command(os.Args[0], "-datadir", dataDir, "backend")
|
proc := exec.Command(os.Args[0], "-datadir", dataDir, "backend")
|
||||||
proc.Stdout = os.Stdout
|
proc.Stdout = os.Stdout
|
||||||
proc.Stderr = os.Stderr
|
proc.Stderr = os.Stderr
|
||||||
|
@ -108,4 +108,6 @@ func startBackendServer() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panicf("can't exec backend: %s", err)
|
log.Panicf("can't exec backend: %s", err)
|
||||||
}
|
}
|
||||||
|
err = proc.Wait()
|
||||||
|
log.Panicf("lost the backend: %s", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue