Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1809)

Issue 4675081: code review 4675081: cgi: close stdout reader pipe when finished (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 8 months ago by bradfitz
Modified:
13 years, 8 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

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 issue 2059

Patch Set 1 #

Patch Set 2 : diff -r 81e9259d59df https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 81e9259d59df https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 4 : diff -r 81e9259d59df https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r b0e964c2f715 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 6 : diff -r f4dbaa62bdf9 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -4 lines) Patch
M src/pkg/exec/exec.go View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M src/pkg/http/cgi/host.go View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/http/cgi/host_test.go View 1 3 chunks +74 lines, -2 lines 0 comments Download
M src/pkg/http/cgi/testdata/test.cgi View 1 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 7
bradfitz
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 8 months ago (2011-07-11 20:47:42 UTC) #1
rsc
i think it's a more general bug. if we think the cgi is done we ...
13 years, 8 months ago (2011-07-11 20:54:57 UTC) #2
bradfitz
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 8 months ago (2011-07-11 21:22:07 UTC) #3
bradfitz
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 8 months ago (2011-07-11 22:03:46 UTC) #4
rsc
LGTM http://codereview.appspot.com/4675081/diff/9002/src/pkg/exec/exec.go File src/pkg/exec/exec.go (right): http://codereview.appspot.com/4675081/diff/9002/src/pkg/exec/exec.go#newcode340 src/pkg/exec/exec.go:340: // standard output when the command starts. add ...
13 years, 8 months ago (2011-07-11 22:53:44 UTC) #5
bradfitz
*** Submitted as http://code.google.com/p/go/source/detail?r=bd12ee706335 *** cgi: close stdout reader pipe when finished This causes the ...
13 years, 8 months ago (2011-07-11 22:59:40 UTC) #6
bradfitz
13 years, 8 months ago (2011-07-12 00:35:23 UTC) #7
You have to build + install the exec package too.

On Mon, Jul 11, 2011 at 5:34 PM, mattn <mattn.jp@gmail.com> wrote:

> This changes make build error.
>
> C:\go\src\pkg\http\cgi>gomake 2>&1 | tee log
> 8g  -o _go_.8 child.go host.go
> host.go:190: stdoutRead.Close undefined (type io.Reader has no field or
> method Close)
> mingw32-make: *** [_go_.8] Error 1
>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b