diff options
Diffstat (limited to 'libpod/oci_conmon_linux.go')
-rw-r--r-- | libpod/oci_conmon_linux.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index d4bdabaf5..3b0b7bc7b 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -547,6 +547,10 @@ func (r *ConmonOCIRuntime) ExecContainer(c *Container, sessionID string, options args = append(args, "-t") } + if options.Streams.AttachInput { + args = append(args, "-i") + } + // Append container ID and command args = append(args, "-e") // TODO make this optional when we can detach @@ -559,9 +563,8 @@ func (r *ConmonOCIRuntime) ExecContainer(c *Container, sessionID string, options execCmd := exec.Command(r.conmonPath, args...) if options.Streams != nil { - if options.Streams.AttachInput { - execCmd.Stdin = options.Streams.InputStream - } + // Don't add the InputStream to the execCmd. Instead, the data should be passed + // through CopyDetachable if options.Streams.AttachOutput { execCmd.Stdout = options.Streams.OutputStream } |