[Python-Dev] Python threads end up blocking signals in subprocesses

Michael Hudson mwh at python.net
Sat Dec 20 10:51:34 EST 2003


martin at v.loewis.de (Martin v. Löwis) writes:

> Jeff Epler <jepler at unpythonic.net> writes:
>
>> > Can you find out what $$ is, and what the PIDs and thread IDs of all
>> > participating threads are?
>> 
>> I'm not sure what all information I should try to gather for you.  Let me
>> know if you think this is enough to file a bug report with...  I changed
>> the example to make it clearer that it's the subprocess ignoring the
>> signal that is the problem, not anything in Python that is taking time
>> to notice the death of a child process.
>
> That is an important observation; signals that are blocked in the
> parent process will be blocked in the child process as well.
>
> I'm not sure what to do about this: We apparently *want* the signals
> blocked in the thread, but we don't want them to be blocked in the
> process invoked through system(). Proposals are welcome.

Does pthread_atfork() help?

Cheers,
mwh

-- 
  We've had a lot of problems going from glibc 2.0 to glibc 2.1.
  People claim binary compatibility.  Except for functions they
  don't like.                       -- Peter Van Eynde, comp.lang.lisp



More information about the Python-Dev mailing list