Skip to content

Commit 2a9b149

Browse files
Merge pull request #25879 from jankaluza/cloexec
Fix the fd leaking to aardvark-dns.
2 parents f691fa7 + d9914ff commit 2a9b149

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libpod/container_internal_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ func (c *Container) getOCICgroupPath() (string, error) {
440440
}
441441

442442
func openDirectory(path string) (fd int, err error) {
443-
return unix.Open(path, unix.O_RDONLY|unix.O_PATH, 0)
443+
return unix.Open(path, unix.O_RDONLY|unix.O_PATH|unix.O_CLOEXEC, 0)
444444
}
445445

446446
func (c *Container) addNetworkNamespace(g *generate.Generator) error {

0 commit comments

Comments
 (0)