diff options
author | baude <bbaude@redhat.com> | 2019-08-06 09:49:03 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-08-06 09:51:38 -0500 |
commit | 97b84dedf3806a9e87c04ccfb51212992785d2c8 (patch) | |
tree | d3046e11b435900e041003c21b0e1e78383c8598 /libpod/oci_internal_linux.go | |
parent | 3bffe77f824772b841080ea463324f5ae5c833d4 (diff) | |
download | podman-97b84dedf3806a9e87c04ccfb51212992785d2c8.tar.gz podman-97b84dedf3806a9e87c04ccfb51212992785d2c8.tar.bz2 podman-97b84dedf3806a9e87c04ccfb51212992785d2c8.zip |
Revert "rootless: Rearrange setup of rootless containers"
This reverts commit 80dcd4bebcdc8e280f6b43228561d09c194c328b.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/oci_internal_linux.go')
-rw-r--r-- | libpod/oci_internal_linux.go | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libpod/oci_internal_linux.go b/libpod/oci_internal_linux.go index 28e4b5b82..52cebefab 100644 --- a/libpod/oci_internal_linux.go +++ b/libpod/oci_internal_linux.go @@ -130,16 +130,10 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Containe } if ctr.config.NetMode.IsSlirp4netns() { - if ctr.config.PostConfigureNetNS { - ctr.rootlessSlirpSyncR, ctr.rootlessSlirpSyncW, err = os.Pipe() - if err != nil { - return errors.Wrapf(err, "failed to create rootless network sync pipe") - } - } else { - defer errorhandling.CloseQuiet(ctr.rootlessSlirpSyncR) - defer errorhandling.CloseQuiet(ctr.rootlessSlirpSyncW) + ctr.rootlessSlirpSyncR, ctr.rootlessSlirpSyncW, err = os.Pipe() + if err != nil { + return errors.Wrapf(err, "failed to create rootless network sync pipe") } - // Leak one end in conmon, the other one will be leaked into slirp4netns cmd.ExtraFiles = append(cmd.ExtraFiles, ctr.rootlessSlirpSyncW) } |