[ruby-cvs:73040] normal:r65940 (trunk): thread.c (rb_wait_for_single_fd): do not miss IO#close notifications

normal at ruby-lang.org normal at ruby-lang.org
Sat Nov 24 07:01:35 JST 2018


normal	2018-11-24 07:01:35 +0900 (Sat, 24 Nov 2018)

  New Revision: 65940

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65940

  Log:
    thread.c (rb_wait_for_single_fd): do not miss IO#close notifications
    
    RUBY_VM_CHECK_INTS_BLOCKING may switch threads and cause `fd'
    to be closed.  So we must ensure we register the waiting_fd
    before checking for interrupts.
    
    This only affects the ppoll/poll-using implementation of
    rb_wait_for_single_fd, as the select-based implementation
    already register waiting_fd before checking for interrupts.

  Modified files:
    trunk/thread.c


More information about the ruby-cvs mailing list