[New-bugs-announce] [issue12268] file readline & readlines methods can lose data on EINTR

Gregory P. Smith report at bugs.python.org
Sun Jun 5 22:39:03 CEST 2011

New submission from Gregory P. Smith <greg at krypto.org>:

The file object readline() and readlines() methods can lose data when an underlying read system call is interrupted.  They will abort with an IOError in this case but any incomplete line data they have read will be discarded.

readline() and readlines() should never raise an IOError for the EINTR interrupted system call case.  They should handle that gracefully, retrying their reads after letting any Python signal handlers run.

assignee: gregory.p.smith
files: file-signal-eintr-27.diff
keywords: needs review, patch
messages: 137714
nosy: gregory.p.smith
priority: normal
severity: normal
status: open
title: file readline & readlines methods can lose data on EINTR
versions: Python 2.7
Added file: http://bugs.python.org/file22258/file-signal-eintr-27.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list