[New-bugs-announce] [issue18175] os.listdir(fd) leaks fd on error

Richard Oudkerk report at bugs.python.org
Mon Jun 10 00:31:46 CEST 2013

New submission from Richard Oudkerk:

If os.listdir() is used with an fd, but fdopendir() fails (e.g. if the the fd is a normal file) then a duplicated fd is leaked.

This explains the leaks in test_shutil mentioned in #18174.

messages: 190875
nosy: sbt
priority: normal
severity: normal
status: open
title: os.listdir(fd) leaks fd on error

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list