aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-13 13:01:18 +0200
committerGitHub <noreply@github.com>2020-08-13 13:01:18 +0200
commit90831dfdced0f52867c47cac75b5ea09e0e916c2 (patch)
tree2ace53976760da9acf103807d8e46cb3f6be1cac /pkg
parentd777a7bd5c920ce3cf06c4eba25068747dbc6b8f (diff)
parentec231973d813e68479b99382350a8684d9c0a685 (diff)
downloadpodman-90831dfdced0f52867c47cac75b5ea09e0e916c2.tar.gz
podman-90831dfdced0f52867c47cac75b5ea09e0e916c2.tar.bz2
podman-90831dfdced0f52867c47cac75b5ea09e0e916c2.zip
Merge pull request #7293 from spearlineltd/fixhang
Fix hang when `path` doesn't exist
Diffstat (limited to 'pkg')
-rw-r--r--pkg/rootless/rootless_linux.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go
index c3f1fc7fa..ecd309d36 100644
--- a/pkg/rootless/rootless_linux.go
+++ b/pkg/rootless/rootless_linux.go
@@ -389,14 +389,12 @@ func TryJoinFromFilePaths(pausePidPath string, needNewNamespace bool, paths []st
lastErr = nil
break
} else {
- fds, err := unix.Socketpair(unix.AF_UNIX, unix.SOCK_DGRAM, 0)
+ r, w, err := os.Pipe()
if err != nil {
lastErr = err
continue
}
- r, w := os.NewFile(uintptr(fds[0]), "read file"), os.NewFile(uintptr(fds[1]), "write file")
-
defer errorhandling.CloseQuiet(r)
if _, _, err := becomeRootInUserNS("", path, w); err != nil {