diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-13 13:01:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-13 13:01:18 +0200 |
commit | 90831dfdced0f52867c47cac75b5ea09e0e916c2 (patch) | |
tree | 2ace53976760da9acf103807d8e46cb3f6be1cac | |
parent | d777a7bd5c920ce3cf06c4eba25068747dbc6b8f (diff) | |
parent | ec231973d813e68479b99382350a8684d9c0a685 (diff) | |
download | podman-90831dfdced0f52867c47cac75b5ea09e0e916c2.tar.gz podman-90831dfdced0f52867c47cac75b5ea09e0e916c2.tar.bz2 podman-90831dfdced0f52867c47cac75b5ea09e0e916c2.zip |
Merge pull request #7293 from spearlineltd/fixhang
Fix hang when `path` doesn't exist
-rw-r--r-- | pkg/rootless/rootless_linux.go | 4 |
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 { |