> On 10/10/2011 08:04 AM, Devin Ben-Hur wrote:

> >> My question is: By the time the "before_exec" hook is executed, is it
> >> guaranteed that unicorn.pid.oldbin ahas lready created (otherwise we
> >> have a racing condition here)? Or is there a better way to achieve
> >> what I want?
> > I'm not 100% positive, but about 98% -- yes, you can count on the fact that
the *.oldbin file will exist on
> > disk before the before_exec block is executed. Eric can confirm this, but
I've never had a problem with it...
> No need to rely on authority, just read the source: 
> https://github.com/defunkt/unicorn/blob/master/lib/unicorn/http_server.rb

Thanks for the pointer. The current source code clearly shows before_exec is
called after the .oldbin file is created. I'd like to know if this is considered
an "invariant" going forward. Could someone in the "authority" help?

Thanks,
Pai-Hung



_______________________________________________
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