aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/exec/exec.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/exec/exec.go')
-rw-r--r--src/pkg/exec/exec.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pkg/exec/exec.go b/src/pkg/exec/exec.go
index 4ddefae24e..3b20f2008c 100644
--- a/src/pkg/exec/exec.go
+++ b/src/pkg/exec/exec.go
@@ -338,7 +338,8 @@ func (c *Cmd) StdinPipe() (io.WriteCloser, os.Error) {
// StdoutPipe returns a pipe that will be connected to the command's
// standard output when the command starts.
-func (c *Cmd) StdoutPipe() (io.Reader, os.Error) {
+// The pipe will be closed automatically after Wait sees the command exit.
+func (c *Cmd) StdoutPipe() (io.ReadCloser, os.Error) {
if c.Stdout != nil {
return nil, os.NewError("exec: Stdout already set")
}
@@ -357,7 +358,8 @@ func (c *Cmd) StdoutPipe() (io.Reader, os.Error) {
// StderrPipe returns a pipe that will be connected to the command's
// standard error when the command starts.
-func (c *Cmd) StderrPipe() (io.Reader, os.Error) {
+// The pipe will be closed automatically after Wait sees the command exit.
+func (c *Cmd) StderrPipe() (io.ReadCloser, os.Error) {
if c.Stderr != nil {
return nil, os.NewError("exec: Stderr already set")
}