mirror of
https://github.com/containers/podman.git
synced 2026-03-19 15:18:44 -04:00
Merge pull request #7293 from spearlineltd/fixhang
Fix hang when `path` doesn't exist
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user