blocking functions do not raise Errno::EINTR
commit73dfbeb1d59fbc1e22651cb4da8ee85f0a6fd9ce
authorEric Wong <normalperson@yhbt.net>
Wed, 4 Jul 2012 00:57:44 +0000 (3 17:57 -0700)
committerEric Wong <normalperson@yhbt.net>
Thu, 5 Jul 2012 20:17:02 +0000 (5 13:17 -0700)
treea74f2182b39bb89999c7065706a69ec5d8d0c316
parentcf0665e57bf4857d4eb4c733527e77545190af59
blocking functions do not raise Errno::EINTR

Blocking functions should not raise Errno::EINTR to match
existing semantics of Ruby IO methods (e.g. IO.select, IO#read,
IO#write).  This makes user code easier to read/write.

Like th Ruby methods we emulate, we only reacquire the GVL on
EINTR to fire signal handlers, but otherwise emulate SA_RESTART
semantics.

This is a backwards-incompatible API change (but unlikely
to break existing code).
ext/posix_mq/posix_mq.c
test/test_posix_mq.rb