mirror of
https://github.com/golang/go
synced 2024-11-19 10:04:56 -07:00
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
This commit is contained in:
parent
2f69a73591
commit
d1f4e0d14e
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user