[Python-bugs-list] [ python-Bugs-617110 ] SIGINT handler no longer installable.

noreply@sourceforge.net noreply@sourceforge.net
Wed, 02 Oct 2002 07:19:28 -0700


Bugs item #617110, was opened at 2002-10-01 18:25
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=617110&group_id=5470

Category: Python Library
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Thorstein Thorsteinsson (thorstein)
Assigned to: Nobody/Anonymous (nobody)
Summary: SIGINT handler no longer installable.

Initial Comment:
After the following commands:

>>> import signal
>>> signal.signal(signal.SIGINT,signal.SIG_IGN)
<built-in function default_int_handler>
>>> print signal.getsignal(signal.SIGINT)
1
>>> 

Typing control-C or sending the process a SIGINT leads
to a KeyboardInterrupt exception. Installing a signal
handler instead of SIG_IGN doesn't help. The docs
clearly state that the default handler can be overridden.
Also in python 1.5.2 the above example works as I
would expect - both control-C and SIGINT are ignored
in that version.

I'm running 2.2.1 on Solaris. I have seen the problem
under Linux also.
 
Python 2.2.1 (#1, Jul 16 2002, 15:22:16) 
[GCC 2.95.2 19991024 (release)] on sunos5


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

>Comment By: Martin v. Löwis (loewis)
Date: 2002-10-02 16:19

Message:
Logged In: YES 
user_id=21627

Can you demonstrate the problem in a self-contained script,
instead of an interactive session? If not, it is likely a
readline issue - not one that we can do much about, so we
would then close this report as "Won't fix".

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

Comment By: Thorstein Thorsteinsson (thorstein)
Date: 2002-10-02 15:05

Message:
Logged In: YES 
user_id=587322

readline: That seems likely actually. I'm using readline both
on the above installation and on the Linux installation
referred to.

A slightly earlier install without readline works ok:
Python 2.1.1 (#3, Nov 29 2001, 17:41:42) 
[GCC 2.95.2 19991024 (release)] on sunos5

Also, if the Python process isn't connected to a terminal
things work fine.

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

Comment By: Michael Hudson (mwh)
Date: 2002-10-02 14:32

Message:
Logged In: YES 
user_id=6656

I find this sort of thing is usually readline's fault.  Is
that possible here?

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

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