Control-C on Unix misbehaviour?

Alex Zbyslaw xfb52.no_spam at dial.pipex.com
Sat Nov 6 06:08:05 EST 1999


Quinn Dunkan wrote:
> 
> On Mon, 18 Oct 1999 15:47:52 +0200, flight at mathi.uni-heidelberg.de
> Here's a data point for Irix6:
> If you hit ^C at the >>> prompt with readline loaded (python 1.5), python
> stops responding.  Further ^Cs do nothing, in fact the only way I've found
> to get out is to kill from another shell or hit ^z kill %.

I had exactly the same problem on FreeBSD 3.2  but ONLY when I had
thread support enabled.

I have eventually tracked the problem down to a bad interaction (read
library/kernel bug) between threads/sigjmp and interrupted reads.

I have created two "fixes" which can be applied either to a) python or
b) python and readline which fix the problems differently.  The fixes
are pretty trivial and so far they work for me.  You can check them out
at http://www.xfb52.dial.pipex.com/patches/python.shtml

I don't know how they may affect people who have had ^C dumping them
into a shell.  No one else has mentioned whether they had thread support
enabled or not.

>From extensive poking around I am quite sure that this misbehaviour is
not a bug in either Python or readline.

Good luck,

--Alex




More information about the Python-list mailing list