Author christian.heimes
Recipients christian.heimes, loewis, pitrou
Date 2008-12-28.20:54:39
SpamBayes Score 7.31451e-05
Marked as misclassified No
Message-id <1230497681.12.0.372405794228.issue4761@psf.upfronthosting.co.za>
In-reply-to
Content
The openat() functions sound useful indeed. However I'm concerned about
the file descriptor requirment for the *at() POSIX functions. In Python
file descriptors can lead to resource leaks because developers are used
to automatic garbage collection. os.open() is the only way to get a file
descriptor to a directory. The builtin open() doesn't open directories.
Developers may think that the file descriptor is closed when the integer
object gets out of scope.

I propose the addition of opendir() for the purpose of the *at()
functions. The opendir function should return a wrapper object around
the DIR* pointer returned by opendir(). A function fileno() exposed the
file descriptor of the DIR pointer via dirfd().
History
Date User Action Args
2008-12-28 20:54:41christian.heimessetrecipients: + christian.heimes, loewis, pitrou
2008-12-28 20:54:41christian.heimessetmessageid: <1230497681.12.0.372405794228.issue4761@psf.upfronthosting.co.za>
2008-12-28 20:54:40christian.heimeslinkissue4761 messages
2008-12-28 20:54:39christian.heimescreate