multiprocessing signal defect
Adam Tauno Williams
awilliam at whitemice.org
Fri Oct 29 16:40:52 CEST 2010
On Fri, 2010-10-29 at 07:31 -0700, Jean-Paul Calderone wrote:
> On Oct 29, 10:08 am, Adam Tauno Williams <awill... at whitemice.org>
> > signal handler to do something smart in the case of a "-15" [for which
> > there isn't really a thread equivalent - can you sent a SystemV style
> > signal to an individual thread in a process? I don't think so.]
> Yes. pthread_kill(P)
Eh, only sort of.
Signal dispositions are process-wide: if a signal handler is installed,
the handler will be invoked in the thread thread, but if the disposition
of the signal is "stop", "continue", or "terminate", this action will
affect the whole process.
Also phthread_kill can only be called for a thread in the same process.
Which is quite different that SystemV signals.
So there can't really be an exact 1:1 match of how thread-signaling vs.
multiprocessing-process-signaling works; which was my point.
More information about the Python-list