Message78431
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(). |
|
Date |
User |
Action |
Args |
2008-12-28 20:54:41 | christian.heimes | set | recipients:
+ christian.heimes, loewis, pitrou |
2008-12-28 20:54:41 | christian.heimes | set | messageid: <1230497681.12.0.372405794228.issue4761@psf.upfronthosting.co.za> |
2008-12-28 20:54:40 | christian.heimes | link | issue4761 messages |
2008-12-28 20:54:39 | christian.heimes | create | |
|