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 Kevin.Barry
Recipients Kevin.Barry, emmanuel, vstinner
Date 2013-03-18.00:52:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
One additional issue, which my patch doesn't address, is that PyRun_InteractiveLoop should really take *two* FILE* arguments, with the second one being optional. This is because on Linux (and presumably on other *nixes) if a read operation is blocked on a file descriptor then write operations (from other threads) to the same file descriptor will also block. That doesn't happen in the current Python implementations because PyOS_Readline is always called with two FILE* objects, anyway (stdin and stdout.) I would, however, expect such a problem to appear if a user created a Python thread in the interactive session that periodically printed to the terminal, then read input from the terminal. In that case, I would expect to see no output from the thread while the read operations were blocked, but I haven't tested it. (I don't remember if this came up after I applied my patch locally.)

I actually considered this when I created the patch; however, I didn't feel like going to all the trouble of adding a member to tok and propagating the change throughout the entire core. I had hoped this bug would get more attention and I'd be able to discuss it with a developer involved in the Python project, but ultimately that didn't happen and I ended up forgetting about it.

Kevin Barry
Date User Action Args
2013-03-18 00:52:37Kevin.Barrysetrecipients: + Kevin.Barry, vstinner, emmanuel
2013-03-18 00:52:37Kevin.Barrysetmessageid: <>
2013-03-18 00:52:37Kevin.Barrylinkissue14916 messages
2013-03-18 00:52:37Kevin.Barrycreate