aboutsummaryrefslogtreecommitdiff
path: root/pkg/rootless/rootless_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-10-09 14:48:33 -0700
committerGitHub <noreply@github.com>2019-10-09 14:48:33 -0700
commit12c9b53439d958395856c29567ec0ed44a5507ed (patch)
treee3f080786bc17228dc1a4a1f3ceef04b64a70fa9 /pkg/rootless/rootless_linux.go
parent2bf184aa019387de560bec60636ae5152f8b54ce (diff)
parent2ceb03d05e6cf365963ab9d3d8af45158097e906 (diff)
downloadpodman-12c9b53439d958395856c29567ec0ed44a5507ed.tar.gz
podman-12c9b53439d958395856c29567ec0ed44a5507ed.tar.bz2
podman-12c9b53439d958395856c29567ec0ed44a5507ed.zip
Merge pull request #4225 from giuseppe/rootless-create-pause-automatically
rootless: automatically recreate the pause.pid file
Diffstat (limited to 'pkg/rootless/rootless_linux.go')
-rw-r--r--pkg/rootless/rootless_linux.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index 6f6239e5f..05d641383 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -566,10 +566,10 @@ func TryJoinFromFilePaths(pausePidPath string, needNewNamespace bool, paths []st
r, w := os.NewFile(uintptr(fds[0]), "read file"), os.NewFile(uintptr(fds[1]), "write file")
- defer errorhandling.CloseQuiet(w)
defer errorhandling.CloseQuiet(r)
if _, _, err := becomeRootInUserNS("", path, w); err != nil {
+ w.Close()
lastErr = err
continue
}
@@ -578,7 +578,6 @@ func TryJoinFromFilePaths(pausePidPath string, needNewNamespace bool, paths []st
return false, 0, err
}
defer func() {
- errorhandling.CloseQuiet(r)
C.reexec_in_user_namespace_wait(-1, 0)
}()