all repos — honk @ 38d8fbec31656d5fb2776398cabafc4872f4171b

my fork of honk

check to see if backend server dies
Ted Unangst tedu@tedunangst.com
Mon, 27 Apr 2020 21:14:05 -0400
commit

38d8fbec31656d5fb2776398cabafc4872f4171b

parent

c46c6e358560fa18d284dab14ec53756608f808f

2 files changed, 4 insertions(+), 2 deletions(-)

jump to
M backend.gobackend.go

@@ -100,7 +100,7 @@ }

srv.Accept(lis) } -func startBackendServer() { +func runBackendServer() { proc := exec.Command(os.Args[0], "-datadir", dataDir, "backend") proc.Stdout = os.Stdout proc.Stderr = os.Stderr

@@ -108,4 +108,6 @@ err := proc.Start()

if err != nil { log.Panicf("can't exec backend: %s", err) } + err = proc.Wait() + log.Panicf("lost the backend: %s", err) }
M web.goweb.go

@@ -2325,7 +2325,7 @@ listener, err := openListener()

if err != nil { log.Fatal(err) } - startBackendServer() + go runBackendServer() go enditall() go redeliverator() go tracker()