This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients neologix, rpointel, vstinner
Date 2014-02-18.00:23:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1392683039.16.0.998687418357.issue20564@psf.upfronthosting.co.za>
In-reply-to
Content
> 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).
History
Date User Action Args
2014-02-18 00:23:59vstinnersetrecipients: + vstinner, neologix, rpointel
2014-02-18 00:23:59vstinnersetmessageid: <1392683039.16.0.998687418357.issue20564@psf.upfronthosting.co.za>
2014-02-18 00:23:59vstinnerlinkissue20564 messages
2014-02-18 00:23:58vstinnercreate