[issue12905] multiple errors in test_socket on OpenBSD
Charles-François Natali
report at bugs.python.org
Tue Sep 6 23:19:37 CEST 2011
Charles-François Natali <neologix at free.fr> added the comment:
> The C signal handler is called, but the system call (read in this case)
> is not interrupted.
That's what I thought...
> Bad news: the script doesn't hang if Python is build without threads.
Makes sense. When linked with pthread, all I/O syscalls are actually non-blocking.
> read() is interrupted after 1 second, it works.
Hmmm...
Does it still work if you don't a create thread beforehand?
Also, one difference is that Python uses sigaction to setup the signal handler. There might be subtle semantics change/bugs between signal/sigaction.
> Oh, siginterrupt(SIGALRM, 0) doesn't work in a program linked to
> pthread.
You could try with sigaction/SA_RESTART.
But OpenBSD's pthread implementation has severe limitations/bugs.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12905>
_______________________________________
More information about the Python-bugs-list
mailing list