[ruby-cvs:70835] normal:r63744 (trunk): mjit.c: avoid execvp PATH lookup in vfork-ed child

normal at ruby-lang.org normal at ruby-lang.org
Mon Jun 25 10:06:15 JST 2018


normal	2018-06-25 10:06:15 +0900 (Mon, 25 Jun 2018)

  New Revision: 63744

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

  Log:
    mjit.c: avoid execvp PATH lookup in vfork-ed child
    
    execvp(3) is not async-signal-safe and may alter libc internal
    states (e.g. those used by malloc).  However execv(3) is
    async-signal-safe as of POSIX.1-2008.
    
    So perform the PATH lookup in the parent and use execv(3)
    in the child.

  Modified files:
    trunk/mjit.c


More information about the ruby-cvs mailing list