Alex Zbyslaw: RE: Re: [Python-bugs-list] PRIVATE: Threads and readline (PR#120)

guido@CNRI.Reston.VA.US guido@CNRI.Reston.VA.US
Mon, 8 Nov 1999 10:30:21 -0500 (EST)


------- Forwarded Message

Date:    Sat, 06 Nov 1999 11:17:00 +0000
From:    Alex Zbyslaw <xfb52@dial.pipex.com>
To:      guido@cnri.reston.va.us
Subject: RE: Re: [Python-bugs-list] PRIVATE: Threads and readline

This is the message I posted today on comp.lang.python.

Btw, I forgot to mention that to compile for thread support on FreeBSD
3.2 (and I would think 3.3) you only need to specify "-pthread" on the
link line.  That automatically links in the threaded C libraries. 
Everything else from the standard configure would appear to be correct.

All the best,

- --Alex


Subject:  Re: Control-C on Unix misbehaviour?
Date:  Sat, 06 Nov 1999 11:08:05 +0000

Quinn Dunkan wrote:
>
> On Mon, 18 Oct 1999 15:47:52 +0200, flight@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

------- End of Forwarded Message