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 kristjan.jonsson
Recipients amaury.forgeotdarc, kristjan.jonsson
Date 2009-04-17.10:18:06
SpamBayes Score 9.639942e-07
Marked as misclassified No
Message-id <1239963491.75.0.276151464423.issue5773@psf.upfronthosting.co.za>
In-reply-to
Content
Yes.  We have tried to accomodate the most reckless use of file 
descriptors.
I'm not sure how to proceed here though, since the builtin streams are 
beyond our control.

I think you would have the same effect if you called os.close(2).

Perhaps the only really good solution is to allow for disabling the fd 
checks after all, but to make it optional, somehow.  Ideally something 
that python.exe sets up, it being the prime motivator....

Really, this fd checking in mscrt is becoming really annoying.  I'm 
inclined to start lobbying MS to remove at least that part of the 
runtime checks by default.  Not that it will do us any good.

Or, perhaps, we should just document the caveats with using file 
descriptors directly in python.  That one has to be careful with their 
use, for example, to not steal them from streams that may be using 
them, not closing them when someone else is, and so on.  Use at your 
own risk.  After all, there are numerous ways to crash python through 
reckless use of code, e.g. by using ctypes.
History
Date User Action Args
2009-04-17 10:18:12kristjan.jonssonsetrecipients: + kristjan.jonsson, amaury.forgeotdarc
2009-04-17 10:18:11kristjan.jonssonsetmessageid: <1239963491.75.0.276151464423.issue5773@psf.upfronthosting.co.za>
2009-04-17 10:18:09kristjan.jonssonlinkissue5773 messages
2009-04-17 10:18:06kristjan.jonssoncreate