[Python-Dev] C bindings calling tmpfile() blocks interrupt signal
Michael Hudson
mwh at python.net
Mon Jul 11 11:32:48 CEST 2005
Florent Pillet <fpillet at gmail.com> writes:
> On 07/07/05, Michael Hudson <mwh at python.net> wrote:
>>>
>> > But with my threaded Python code, SIGINT doesn't work anymore after my
>> > binding has called tmpfile().
>>
>> Oh, threads.
>>
>> Which version of Python are you using?
>
> 2.3.5, the one that ships with Mac OS X 10.4. I have a 2.4.x install
> somewhere, I'll give it a go.
Please do. If my guess as to what's going on is right, you won't have
the problem.
> But you're right, it's probably because of threads.
You *may* be able to work around this by only calling tmpfile on the
main thread (just a guess).
> Now I'm trying to determine whether this is a Python bug or a Mac OS
> X bug...
Well, again assuming my guess is right, it's probably an OS X bug, but
really threads vs signals issues are enormously subtle and frequently
messed up.
Python 2.4 is much less vulnerable to such cock ups.
Cheers,
mwh
--
we're already scrubbing the face of intuition with steel wool,
setting it on fire, then putting it out with an axe <wink>.
-- Tim Peters, on comparing recursive structures
More information about the Python-Dev
mailing list