Author jnoller
Recipients OG7, grahamd, i000, jnoller, ptn
Date 2009-06-19.21:53:43
SpamBayes Score 9.5105e-12
Marked as misclassified No
Message-id <4222a8490906191453u38ded209y3b71b5a8f2f1d0a0@mail.gmail.com>
In-reply-to <1245426926.05.0.964162416741.issue5313@psf.upfronthosting.co.za>
Content
On Fri, Jun 19, 2009 at 11:55 AM, OG7<report@bugs.python.org> wrote:
>
> OG7 <onyxg7@users.sourceforge.net> added the comment:
>
> One shouldn't close the fileno after the file has been closed. The
> stdlib raises an error, and the open(os.devnull) won't be reached. If no
> error was thrown, it would be worse. This would be closing a fileno that
> doesn't belong to sys.stdin anymore and may be used somewhere else.
>
> The open(os.devnull) bit is both so that no one tries to do anything
> with the old stdin anymore, and to let applications attempt to read from
> stdin without an IOError.

Fair enough, I was worried a bit about skipping the
os.close(sys.stdin.fileno()) - the tests pass with both (because the
close fixes the basic problem). I need to come up with an appropriate
documentation note about the double flush issue, add in the tests I
gleaned from the other bugs and commit it. I'll post the full
doc/tests/code patch before doing so.
History
Date User Action Args
2009-06-19 21:53:45jnollersetrecipients: + jnoller, OG7, grahamd, ptn, i000
2009-06-19 21:53:44jnollerlinkissue5313 messages
2009-06-19 21:53:43jnollercreate