El Sábado, 9 de Enero de 2010, Iñaki Baz Castillo escribió:
> El Sábado, 9 de Enero de 2010, Eric Wong escribió:
> > The worker_loop just compares Process.ppid with the original ppid it
> > was started with.  They wakeup from IO.select() every timeout/2 seconds
> > to check for original_ppid != ppid if the server is idle.
> 
> Thanks, I was expecting exactly that as the ppid changes when the master
> process dies :)

I've implememented the same concept for my extra-processes in a similar way:

        ppid = Process.ppid
        Thread.new do
          loop do
            sleep 4
            if Process.ppid != ppid
              log.fatal "master process did, exiting"
              exit!
            end
          end
        end


-- 
Iñaki Baz Castillo <[email protected]>
_______________________________________________
Unicorn mailing list - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to