On 03/10 09:19, Eric Wong wrote:
> Jeremy Evans <c...@jeremyevans.net> wrote:
> > Here's V2 of the patch, which I think should address all of the issues
> > you pointed out.
> 
> Thanks.  Pushed to git://80x24.org/unicorn worker_exec I can add
> tests, later, or you can.  I also had some FreeBSD test fixes
> (which might apply to OpenBSD) on a VM somewhere which I'll Cc:
> you on: there was also just SO_KEEPALIVE fix I posted:
> 
>   https://bogomips.org/unicorn-public/20170310203431.28067-...@80x24.org/raw

The C test code also returns 8 on OpenBSD, FWIW.  I'm happy to test any
test fixes on OpenBSD, just let me know.

> 
> >      worker_nr = -1
> >      until (worker_nr += 1) == @worker_processes
> >        @workers.value?(worker_nr) and next
> >        worker = Unicorn::Worker.new(worker_nr)
> >        before_fork.call(self, worker)
> > -      if pid = fork
> > -        @workers[pid] = worker
> > -        worker.atfork_parent
> > +
> > +      pid = if @worker_exec
> > +        worker_spawn(worker)
> >        else
> > -        after_fork_internal
> > -        worker_loop(worker)
> > -        exit
> > +        fork do
> > +          after_fork_internal
> > +          worker_loop(worker)
> > +          exit
> > +        end
> 
> I prefer to avoid the block with fork.  The block deepens the
> stack for the running app, so it can affect GC efficiency.
> 
> Can be fixed in a separate patch...

That makes sense.  If you would like me to send a separate patch to fix
it, I can do that.

Thanks,
Jeremy
--
unsubscribe: unicorn-public+unsubscr...@bogomips.org
archive: https://bogomips.org/unicorn-public/

Reply via email to