[New-bugs-announce] [issue26894] Readline not aborting line edition on sigint

Memeplex report at bugs.python.org
Sat Apr 30 10:45:06 EDT 2016


New submission from Memeplex:

Maybe this is just a bug in ipython but as it's closely related to http://bugs.python.org/issue23735 I'm reporting it here too, just in case.

-- My original report to bug-readline:

using readline with ipython 4.1.2 and the TkAgg (or GTK3Agg)
backend for matplotlib, I observed the following behavior:

1) open ipython in pylab mode (ipython --pylab or use the %pylab magic once inside the repl).

2) Type something.

3) Press Ctrl-C: line edition is not aborted as expected.

-- And this was Chet answer:

This is probably the result of the same signal handling issues as with
SIGWINCH that we discussed a little more than a year ago. Readline
catches the signal, sets a flag, and, when it's safe, resends it to the
calling application. It expects that if the calling application catches
SIGINT, it will take care of cleaning up the readline state. Sometimes
applications don't want to kill the current line on SIGINT.
Notice it doesn't happen with the Qt5Agg backend.

----------
components: Extension Modules
messages: 264559
nosy: memeplex
priority: normal
severity: normal
status: open
title: Readline not aborting line edition on sigint
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26894>
_______________________________________


More information about the New-bugs-announce mailing list