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 pitrou
Recipients alanwilter, georg.brandl, neologix, pitrou
Date 2011-01-09.20:59:24
SpamBayes Score 3.17413e-13
Marked as misclassified No
Message-id <1294606761.3700.3.camel@localhost.localdomain>
In-reply-to <>
> Attached is a tentative patch: it checks for pending signals inside
> _bufferedreader_read_generic, fileio_readall, and rawiobase_readall.
> I tested quickly on regular files and on pipes, and handlers are now
> called on time. As a an obvious bonus, it's also easier to interrupt a
> script doing I/O with a KeyboardInterrupt (SIGINT).
> If nothing seems blatantly wrong about this patch, I will go ahead and
> try to write some tests for this.

A potential downside is that the bytes which have been read simply get
lost. But since a signal can happen at any moment I guess nothing can be
done to protect from it in the general case, anyway.

As for the tests, the SignalsTest class in is a natural
Date User Action Args
2011-01-09 20:59:29pitrousetrecipients: + pitrou, georg.brandl, neologix, alanwilter
2011-01-09 20:59:24pitroulinkissue9504 messages
2011-01-09 20:59:24pitroucreate