From 2aaa155a3e7881c71eb7f10a1d04e6974bbafb3f Mon Sep 17 00:00:00 2001 From: Iwasaki Yudai Date: Fri, 21 Aug 2015 12:36:26 +0900 Subject: [PATCH] Call `Wait()` to prevent processes from being defunct --- app/app.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/app.go b/app/app.go index 9312d0d..f0a0586 100644 --- a/app/app.go +++ b/app/app.go @@ -216,6 +216,7 @@ func (app *App) generateHandler() func(w http.ResponseWriter, r *http.Request) { go func() { <-exit + cmd.Wait() conn.Close() log.Printf("Connection closed: %s", r.RemoteAddr) }()