[ruby-cvs:71799] normal:r64707 (trunk): thread.c (rb_thread_atfork): reinitialize current th->interrupt_lock

normal at ruby-lang.org normal at ruby-lang.org
Thu Sep 13 10:43:03 JST 2018


normal	2018-09-13 10:43:03 +0900 (Thu, 13 Sep 2018)

  New Revision: 64707

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

  Log:
    thread.c (rb_thread_atfork): reinitialize current th->interrupt_lock
    
    Another thread may be holding th->interrupt_lock while our
    current thread calls fork.  Therefore we must reinitialize our
    own th->interrupt_lock in the child process because the owner
    of the lock is only in the parent.  The original parent process
    is unaffected.  We cannot destroy the lock while it has an unknown
    state, either, so some implementations can leak a small amount
    of memory, here (NPTL won't).

  Modified files:
    trunk/thread.c


More information about the ruby-cvs mailing list