El Martes, 5 de Enero de 2010, Eric Wong escribió:
> > before_fork do |server, worker|
> > `echo "before_fork $$" >> /tmp/kk`
> > File.open("/tmp/kk", "a") do |f|
> > f.puts "$$=#{$$}"
> > end
> > end
>
> Odd, I'm confused by the way `` is working there too... I wonder if
> this is a Ruby bug... Anyhow, in your use case system() or your
> File.open block should be the way to go. Don't use `` when system()
> will do.
I think that the above makse sense since `` creates a new process (with its
own pid). So each time it's called (once per worker) it will be a different
process.
--
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