Message143652
> 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. |
|
Date |
User |
Action |
Args |
2011-09-06 21:19:37 | neologix | set | recipients:
+ neologix, vstinner, rpointel |
2011-09-06 21:19:37 | neologix | set | messageid: <1315343977.22.0.80755603816.issue12905@psf.upfronthosting.co.za> |
2011-09-06 21:19:36 | neologix | link | issue12905 messages |
2011-09-06 21:19:36 | neologix | create | |
|