From: Brad Fitzpatrick Date: Mon, 11 Jul 2011 21:46:46 +0000 (-0700) Subject: exec: closeAfterWait append bug X-Git-Tag: weekly.2011-07-19~129 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d1f4e0d14e4a86ca7d35d569e3d20555b14da4ab;p=gostls13.git exec: closeAfterWait append bug Wasn't actually eager closing the fds as a result of the copy/paste bug. (GC was doing it instead) R=rsc CC=golang-dev https://golang.org/cl/4671057 --- diff --git a/src/pkg/exec/exec.go b/src/pkg/exec/exec.go index 5b988d5eb4..4ddefae24e 100644 --- a/src/pkg/exec/exec.go +++ b/src/pkg/exec/exec.go @@ -332,7 +332,7 @@ func (c *Cmd) StdinPipe() (io.WriteCloser, os.Error) { } c.Stdin = pr c.closeAfterStart = append(c.closeAfterStart, pr) - c.closeAfterWait = append(c.closeAfterStart, pw) + c.closeAfterWait = append(c.closeAfterWait, pw) return pw, nil } @@ -351,7 +351,7 @@ func (c *Cmd) StdoutPipe() (io.Reader, os.Error) { } c.Stdout = pw c.closeAfterStart = append(c.closeAfterStart, pw) - c.closeAfterWait = append(c.closeAfterStart, pr) + c.closeAfterWait = append(c.closeAfterWait, pr) return pr, nil } @@ -370,6 +370,6 @@ func (c *Cmd) StderrPipe() (io.Reader, os.Error) { } c.Stderr = pw c.closeAfterStart = append(c.closeAfterStart, pw) - c.closeAfterWait = append(c.closeAfterStart, pr) + c.closeAfterWait = append(c.closeAfterWait, pr) return pr, nil }