STINNER Victor added the comment:

> So this looks like a bug.

Or a different design choice?

It looks like the kernel restarts the wait if it was interrupted.

"ignore interruptions other than cancelation"
http://ftp.cc.uoc.gr/mirrors/OpenBSD/src/lib/librthread/rthread_sem.c

"test that sem_timedwait() resumes after handling a signal"
http://mirrors.ircam.fr/pub/OpenBSD/src/regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c

POSIX says that "The sem_timedwait() function shall fail if: [EINTR] A signal 
interrupted this function."
http://pubs.opengroup.org/onlinepubs/009604599/functions/sem_timedwait.html

Right now, the best we can do is to skip the test on OpenBSD (maybe only on 
OpenBSD <= 5.4 to see if it changes later).

----------

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

Reply via email to