ok, try not to lose the pipe too soon
This commit is contained in:
parent
71f8265697
commit
caa1cbdd42
|
@ -78,7 +78,7 @@ func orphancheck() {
|
||||||
var b [1]byte
|
var b [1]byte
|
||||||
os.Stdin.Read(b[:])
|
os.Stdin.Read(b[:])
|
||||||
dlog.Printf("backend shutting down")
|
dlog.Printf("backend shutting down")
|
||||||
//os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func backendServer() {
|
func backendServer() {
|
||||||
|
@ -112,7 +112,7 @@ func backendServer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func runBackendServer() {
|
func runBackendServer() {
|
||||||
r, _, err := os.Pipe()
|
r, w, err := os.Pipe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
elog.Panicf("can't pipe: %s", err)
|
elog.Panicf("can't pipe: %s", err)
|
||||||
}
|
}
|
||||||
|
@ -126,4 +126,5 @@ func runBackendServer() {
|
||||||
}
|
}
|
||||||
err = proc.Wait()
|
err = proc.Wait()
|
||||||
elog.Printf("lost the backend: %s", err)
|
elog.Printf("lost the backend: %s", err)
|
||||||
|
w.Close()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue