[Patches] [ python-Patches-751916 ] Handle keyboard interrupts in SSL module

SourceForge.net noreply@sourceforge.net
Tue, 17 Jun 2003 14:04:22 -0700


Patches item #751916, was opened at 2003-06-10 15:36
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=751916&group_id=5470

Category: Modules
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Kevin Jacobs (jacobs99)
Assigned to: Nobody/Anonymous (nobody)
Summary: Handle keyboard interrupts in SSL module

Initial Comment:
As of Python 2.3 beta 1 (and current CVS), the
SSL module does not check to see if a keyboard
interrupt occurred after waiting on connections,
reads, and writes.  This results in long
delays (seconds or even minutes) before the
KeyboardInterrupt is finally raised, causing
problematic pauses for interactive processes.  This
does not happen in Python 2.2.2, though I have not
looked into what has changed.

My next step is to look into httplib, the use-case that
brought this to my attention, since some of the
buffering code is not exception safe.  i.e., a
KeyboardInterrupt can cause data to be lost on
subsequent reads.  I suspect that it is also possible
to lose data on due to socket timeouts as well, so I
consider this issue a distinct bug.

I did not include a new unit test, since it is a little
tricky to produce.  It requires a large SSL transfer and
a network timing-sensitive threshold test to detect.

Also included in the attached patch are some error
handling fixes and cleanups related to time-out
operations that I happened to notice.  This module
deserves more attention, since the timeout changes
don't look like they were integrated as carefully
as they could have been and other similar errors are
possible.


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2003-06-17 23:04

Message:
Logged In: YES 
user_id=21627

The patch looks fine to me.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=751916&group_id=5470