cgi: wait on subprocess exit code, no zombies.

This commit is contained in:
Brad Fitzpatrick 2011-01-27 21:50:07 -08:00
parent 7c9400ac7f
commit 0baf46c69a
1 changed files with 1 additions and 1 deletions

View File

@ -92,9 +92,9 @@ func (h *CgiHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
return return
} }
defer func() { defer func() {
// TODO: close subprocess somehow? No kill?!
cmd.Stdin.Close() cmd.Stdin.Close()
cmd.Stdout.Close() cmd.Stdout.Close()
cmd.Wait(0) // no zombies
}() }()
if req.ContentLength != 0 { if req.ContentLength != 0 {