This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients larry, rosslagerwall
Date 2011-09-05.15:53:36
SpamBayes Score 0.005212821
Marked as misclassified No
Message-id <1315238017.4.0.698737756123.issue12898@psf.upfronthosting.co.za>
In-reply-to
Content
Well, there's no os.fdopendir(); I think you're referring to fdlistdir(), which uses the C function fdopendir() internally.  The DIR structure is not exposed to the Python caller at any point.

I did miss the whole opendir-returns-a-DIR-not-a-fd thing, hopefully that's my dumb thing of the day.  This suggests opendir() would have to call dirfd() on your behalf.

Would it be safe to call close() on the fd returned from dirfd(opendir())?  If not, I guess we'd need a special closedir() function, which would use the C functions fdopendir() then closedir() internally.

... or we could forget the whole thing, I guess.
History
Date User Action Args
2011-09-05 15:53:37larrysetrecipients: + larry, rosslagerwall
2011-09-05 15:53:37larrysetmessageid: <1315238017.4.0.698737756123.issue12898@psf.upfronthosting.co.za>
2011-09-05 15:53:36larrylinkissue12898 messages
2011-09-05 15:53:36larrycreate