NetBSD Problem Report #24797
Received: (qmail 23635 invoked by uid 605); 16 Mar 2004 10:54:40 -0000
Message-Id: <20040316105436.0069F114E5@home.mewburn.net>
Date: Tue, 16 Mar 2004 21:54:36 +1100 (EST)
From: lukem@NetBSD.org
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: lukem@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: python ignores first ^C
X-Send-Pr-Version: 3.95
>Number: 24797
>Category: pkg
>Synopsis: python ignores first ^C
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lukem
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 16 10:55:00 +0000 2004
>Closed-Date: Mon Jun 14 02:36:04 +0000 2004
>Last-Modified: Mon Jun 14 02:36:04 +0000 2004
>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:
From: Michal Pasternak <michal@pasternak.w.lub.pl>
To: lukem@NetBSD.org
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: pkg/24797: python ignores first ^C
Date: Tue, 16 Mar 2004 12:01:48 +0100
lukem@NetBSD.org [Tue, Mar 16, 2004 at 09:54:36PM +1100]:
> >Description:
> python ignores the first ^C (keyboard interrupt) when reading from
> stdin. This is reproducable in python15, python22, python23-pth.
Same in FreeBSD 4.9 for python23-pth
State-Changed-From-To: open->analyzed
State-Changed-By: lukem
State-Changed-When: Thu Jun 10 00:21:53 UTC 2004
State-Changed-Why:
This is a bug in the python interpreter, where it's not correctly
disabling restartable signals in all cases.
I have submitted a bug report and patch to the python developers,
and these could be added as patches to pkgsrc
State-Changed-From-To: analyzed->closed
State-Changed-By: lukem
State-Changed-When: Mon Jun 14 02:35:21 UTC 2004
State-Changed-Why:
I've added patch-c[ab] to python23{,-pth} to fix this problem.
Upgrade to python 2.3.4nb1 (or the -pth version)
Responsible-Changed-From-To: pkg-manager->lukem
Responsible-Changed-By: lukem
Responsible-Changed-When: Mon Jun 14 02:35:21 UTC 2004
Responsible-Changed-Why:
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.