Charles-François Natali added the comment:

> It looks like the main process keeps getting killed by SIGUSR1.
> Don't know why.

In Lib/test/_test_multiprocessing.py:
"""
    def test_poll_eintr(self):
        got_signal = [False]
        def record(*args):
            got_signal[0] = True
        pid = os.getpid()
        oldhandler = signal.signal(signal.SIGUSR1, record)
        try:
            killer = self.Process(target=self._killer, args=(pid,))
            killer.start()
            p = self.Process(target=time.sleep, args=(1,))
            p.start()
            p.join()
            self.assertTrue(got_signal[0])
            self.assertEqual(p.exitcode, 0)
            killer.join()
        finally:
            signal.signal(signal.SIGUSR1, oldhandler)
"""

If the _killer process takes too long to start, it won't send SIGUSR1 before 
the p process returns (0.5s vs 1s): which means that the default SIGUSR1 
handler will be restored before SIGUSR1 is sent. Then SIGUSR1 comes in, 
resulting on the failure above.

----------
nosy: +neologix

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18786>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to