[ruby-cvs:71568] normal:r64476 (trunk): thread_sync.c (rb_mutex_sleep): disable interrupt checking in ensure

normal at ruby-lang.org normal at ruby-lang.org
Mon Aug 20 07:20:22 JST 2018

normal	2018-08-20 07:20:22 +0900 (Mon, 20 Aug 2018)

  New Revision: 64476


    thread_sync.c (rb_mutex_sleep): disable interrupt checking in ensure
    This is needed to reliably fix ConditionVariable#wait on Thread#kill
    [Bug #14999] because there is still a chance an interrupt could fire
    and prevent lock acquisition after an ensure statement.
    Arguably, rb_mutex_lock itself should be uninterruptible, but that
    already prevents bootstraptest/test_thread.rb from completing and
    probably breaks existing use cases.
    For reference, POSIX expressly forbids EINTR from pthread_mutex_lock.
    [ruby-core:88556] [Bug #14999]

  Modified files:

More information about the ruby-cvs mailing list