[issue10956] file.write and file.read don't handle EINTR

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r88610 (3.3), r88611 (3.2) and r88612 (2.7). -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue10956] file.write and file.read don't handle EINTR

2011-02-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> pitrou nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue10956] file.write and file.read don't handle EINTR

2011-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I hadn't noticed that issue9504 is similar. The patch there does less things, although it also touches FileIO.readall(). -- ___ Python tracker ___

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch for Python 3.2+. -- keywords: +patch nosy: +amaury.forgeotdarc stage: -> patch review Added file: http://bugs.python.org/file20472/eintr_io.patch ___ Python tracker

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Mark Florisson
Mark Florisson added the comment: > Ok. This would only be done in buffered mode, though, so your fwrite.py > example would have to be changed slightly (drop the ",0" in fdopen()). Indeed, good catch. So apparently file.write (in buffered mode) is also "incorrect" in Python 3. -- Add

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > file.write, on EINTR, could decide to continue writing if no Python > signal handler raised an exception. > Analogously, file.read could decide to keep on reading on EINTR if no > Python signal handler raised an exception. Ok. This would only be done in buffe

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oops, sorry, had missed the relevant part in your original message. -- ___ Python tracker ___ ___ P

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Mark Florisson
Mark Florisson added the comment: I think this sums it up: file.write, on EINTR, could decide to continue writing if no Python signal handler raised an exception. Analogously, file.read could decide to keep on reading on EINTR if no Python signal handler raised an exception. --

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: What behaviour would you expect instead? -- nosy: +pitrou versions: -Python 2.5, Python 2.6, Python 3.1 ___ Python tracker ___ ___

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Mark Florisson
Mark Florisson added the comment: Here is fread.py (why can you only attach one file at a time? :P) -- Added file: http://bugs.python.org/file20463/fread.py ___ Python tracker _

[issue10956] file.write and file.read don't handle EINTR

2011-01-20 Thread Mark Florisson
New submission from Mark Florisson : In both Python versions EINTR is not handled properly in the file.write and file.read methods. - file.write - In Python 2, file.write can write a short amount of bytes, and when it is interrupted there is no w