STINNER Victor <victor.stin...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue12363>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to