[ruby-cvs:72534] normal:r65434 (trunk): process.c: implement rb_f_system without toggling ruby_nocldwait

normal at ruby-lang.org normal at ruby-lang.org
Tue Oct 30 08:52:40 JST 2018


normal	2018-10-30 08:52:39 +0900 (Tue, 30 Oct 2018)

  New Revision: 65434

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

  Log:
    process.c: implement rb_f_system without toggling ruby_nocldwait
    
    Following how mjit_worker.c currently works, rb_f_system
    now ensures the VM-wide waitpid lists is locked before
    creating a new process via fork/vfork.
    
    This ensures other rb_waitpid callers cannot steal work and
    there are no possible race conditions from toggling
    ruby_nocldwait without the use of atomics.
    
    This sets us up for implementing MJIT process management
    logic using normal Ruby APIs prepares us for VM-wide
    asynchronous/event-base waitpid which can allow MJIT to
    work without worker threads.

  Modified files:
    trunk/internal.h
    trunk/process.c


More information about the ruby-cvs mailing list