From 540f44d3b2d57d9a4ff5dcd64a686e64a90cf683 Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Thu, 18 Dec 2014 00:14:49 +0300 Subject: [PATCH] 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 --- process.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/process.go b/process.go index 489666a58..924de2ecf 100644 --- a/process.go +++ b/process.go @@ -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 }