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 ezio.melotti
Recipients benjamin.peterson, ezio.melotti, i386x, jcea, pitrou, stutzbach
Date 2011-09-13.12:56:22
SpamBayes Score 2.6913689e-05
Marked as misclassified No
Message-id <1315918583.12.0.837309207439.issue12969@psf.upfronthosting.co.za>
In-reply-to
Content
fd support is intentional, see Modules/_io/_iomodule.c:318

OTOH closing sys.stdin doesn't exit Python, so I'm not sure why closing fd 0 should.

I was also thinking about possible security implications of this, but if someone tries to pass '0' as filename, it will most likely be passed to open as a string.
History
Date User Action Args
2011-09-13 12:56:23ezio.melottisetrecipients: + ezio.melotti, jcea, pitrou, benjamin.peterson, stutzbach, i386x
2011-09-13 12:56:23ezio.melottisetmessageid: <1315918583.12.0.837309207439.issue12969@psf.upfronthosting.co.za>
2011-09-13 12:56:22ezio.melottilinkissue12969 messages
2011-09-13 12:56:22ezio.melotticreate