Commit d1f4e0d1 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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
parent 2f69a735
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment