Call `Wait()` to prevent processes from being defunct

This commit is contained in:
Iwasaki Yudai 2015-08-21 12:36:26 +09:00
parent b4b9435b58
commit 2aaa155a3e
1 changed files with 1 additions and 0 deletions

View File

@ -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)
}()