[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

STINNER Victor report at bugs.python.org
Sun Jun 19 23:08:52 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

I tried to patch the test to use a semaphore, but my patch was not reliable (don't remove completly the race condition).

Here is a patch using a subprocess to:
 - have only one thread
 - have a timeout on the blocking read (select cannot be used in the test, select always fail with EINTR, the kernel doesn't restart it)
 - not touch signal handling of the parent process

It is also based on time: it uses alarm() to raise a signal in one second, and use an hardcoded timeout of 3 seconds. But it doesn't need tricky synchronization between two processes.

----------
keywords: +patch
nosy: +pitrou
Added file: http://bugs.python.org/file22409/test_siginterrupt.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12363>
_______________________________________


More information about the Python-bugs-list mailing list