Subject: pkg/24797: python ignores first ^C
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <lukem@NetBSD.org>
List: netbsd-bugs
Date: 03/16/2004 21:54:36
>Number:         24797
>Category:       pkg
>Synopsis:       python ignores first ^C
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 16 10:55:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Luke Mewburn
>Release:        NetBSD 1.6ZK
>Organization:
The NetBSD Foundation
>Environment:
System: NetBSD argo 1.6ZK NetBSD 1.6ZK (LUKEM_SERVER from GENERIC-$Revision: 1.594 $) #0: Fri Mar 12 00:08:14 EST 2004 lukem@argo:/var/obj/i386/usr/src/sys/arch/i386/compile/LUKEM_SERVER i386
Architecture: i386
Machine: i386
>Description:
	python ignores the first ^C (keyboard interrupt) when reading from
	stdin.  This is reproducable in python15, python22, python23-pth.

>How-To-Repeat:

	% python
	>>> import sys
	>>> foo=sys.stdin.read()
	^C^CTraceback (most recent call last):
	  File "<stdin>", line 1, in ?
	  KeyboardInterrupt
			[first ^C was ignored]
	>>>

	>>> foo=sys.stdin.read()
	^CTraceback (most recent call last):
	  File "<stdin>", line 1, in ?
	  KeyboardInterrupt
			[this time the first ^C works]
	>>>


	This problem will also occur if you run the script
		#!/usr/bin/python
		import sys
		foo=sys.stdin.read()


>Fix:
	No idea.
	This doesn't occur on the Solaris 8 and RedHat 7.x.
>Release-Note:
>Audit-Trail:
>Unformatted: