From: Bill Kelly Date: 2018-06-28T22:10:57-07:00 Subject: [ruby-core:87677] Re: [Ruby trunk Bug#14867] Process.wait can wait for MJIT compiler process Eric Wong wrote: > eregontp@gmail.com wrote: >> Would it be simpler to track a set of pids created by MJIT, ignore those in >> waitpid() and synchronize around both creating GCC processes and when checking >> the result of waitpid()? > > Not possible, if there's a thread running in waitpid(-1, 0), > it can steal the result of waitpid(mjit_used_by_pid). Could it help at all to delegate to a single "JIT Controller" daemon? E.g. - At startup, Ruby forks a single JIT Controller daemon, meant to persist for the duration of the Ruby process - JITC daemon removes itself from Ruby's process group - Ruby communicates with JITC daemon via pipes, and JITC in turn spawns and waits for JIT compiler processes Just a thought. (Apologies if not applicable; I'm not well-versed in the current JIT architecture.) Regards, Bill Unsubscribe: