process: use io.Reader instead of io.WriteCloser for standard fds

Could someone explain why we should close this fds? Usually users
cares about closing them or not.
For example exec.Cmd declares them as io.Reader.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
This commit is contained in:
Andrey Vagin
2014-12-18 00:14:49 +03:00
parent 7996829914
commit 540f44d3b2
+3 -6
View File
@@ -17,11 +17,8 @@ type ProcessConfig struct {
// If a reader or writer is nil, the input stream is assumed to be empty and the output is
// discarded.
//
// The readers and writers, if supplied, are closed when the process terminates. Their Close
// methods should be idempotent.
//
// Stdout and Stderr may refer to the same writer in which case the output is interspersed.
Stdin io.ReadCloser
Stdout io.WriteCloser
Stderr io.WriteCloser
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
}