Issue #14867 has been updated by akr (Akira Tanaka).


I think it is bit difficult to solve.

It seems Solaris have good feature: POSIX_SPAWN_WAITPID_NP for posix_spawn.
https://www.unix.com/man-page/all/3C/posix_spawn/
But it is not portable enough for us.

One idea that MJIT invokes compiler via a invoker process:
- ruby forks a temporary process
- the temporary process forks invoker process
- the temporary process exits
- ruby requests the invoker process to invoke compiler (via pipe)

Since the invoker process and compiler processes are not a child process of ruby,
Process.wait doesn't wait them.

or

Deprecate Process.wait.


 



----------------------------------------
Bug #14867: Process.wait can wait for MJIT compiler process
https://bugs.ruby-lang.org/issues/14867#change-72622

* Author: k0kubun (Takashi Kokubun)
* Status: Open
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
If Ruby tries to wait for any child process, MJIT's gcc/clang process could be caught by the method call. It's not convenient for both Ruby's user and MJIT worker thread, so Process.wait and its families should somehow avoid waiting for it.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>