[IPython-dev] Ctrl-C quitting ipython

Robert Kern robert.kern@gmail....
Wed Nov 3 14:01:21 CDT 2010

On 11/3/10 11:08 AM, Hans Meine wrote:
> Op den Middeweken 03 November 2010 Klock 16:51:04 hett Gael Varoquaux
> schreven:
>> On Wed, Nov 03, 2010 at 04:49:45PM +0100, Hans Meine wrote:
>>> Op den Middeweken 03 November 2010 Klock 15:09:50 hett Hans Meine
>>> schreven:
>>>> The result: "Program exited with code 01." - looks like sys.exit(1) (or
>>>> the equivalent in C in some library) being called.  Probably some
>>>> extension installed a signal handler (we suspect openmesh).
>>> Problem solved, it was "from enthought.tvtk.api import tvtk" which
>>> installed a SIGINT handler, and updating the ETS helped.
>> Ugly! How did updating ETS help? Is the SIGINT handler removed in the new
>> ETS?
> I don't know the details, but that's my impression, yes.  Such are the risks
> of running software from development repositories, I guess... ;-)
> Unfortunately, it's probably not possible to detect this within ipython,
> right?  After all, the SIGINT handler might also have played nice.  It would
> be interesting to know

> - whether we can detect and report signal handlers being installed

You can get any Python-installed handler using signal.getsignal(signal.SIGINT). 
I don't know if you can determine C-installed handlers. Would you mind reverting 
to your previous version of ETS to see if getsignal() returns you anything? I 
don't think we ever installed a handler directly in ETS, but VTK or your GUI 
toolkit might have. Did you update either of those along with ETS?

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the IPython-dev mailing list