summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/networking_linux.go1
-rw-r--r--libpod/oci_conmon_linux.go9
2 files changed, 7 insertions, 3 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index 06b3fe957..89dac2b5d 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -344,6 +344,7 @@ func (r *Runtime) setupRootlessPortMapping(ctr *Container, netnsPath string) (er
NetNSPath: netnsPath,
ExitFD: 3,
ReadyFD: 4,
+ TmpDir: ctr.runtime.config.TmpDir,
}
cfgJSON, err := json.Marshal(cfg)
if err != nil {
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 0312f0ba2..b09dc3a4f 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -546,6 +546,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
@@ -558,9 +562,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
}