]> Cypherpunks repositories - gostls13.git/commit
cgi: close stdout reader pipe when finished
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 11 Jul 2011 22:59:27 +0000 (15:59 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 11 Jul 2011 22:59:27 +0000 (15:59 -0700)
commit1722ec22cd6a34dcef717cc242e3e1ac24366069
tree453d0f03ca07f9796b02d9313624caa20278db35
parentd53385fd0c986c33c60e4d6fce6b39b6bd779a72
cgi: close stdout reader pipe when finished

This causes the child, if still writing, to get an error or
SIGPIPE and most likely exit so our subsequent wait can
finish.

A more guaranteed fix would be putting a time limit on the
child's overall execution, but this fixes the problem
I was having.

Fixes #2059

R=rsc
CC=golang-dev
https://golang.org/cl/4675081
src/pkg/exec/exec.go
src/pkg/http/cgi/host.go
src/pkg/http/cgi/host_test.go
src/pkg/http/cgi/testdata/test.cgi