mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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:
+3
-6
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user