Hi,

I have a question about automating the restarting of Unicorn with the
following steps, and much appreciate your help.

Assumption: (i) "pid" is set to unicorn.pid in the config file; (ii) a
Unicorn process is already running.

(1) kill -USR2 `cat unicorn.pid` (via Capistrano deployment task for example)
(2) Inside the "before_exec" hook in the config file, do: kill -QUIT
`cat unicorn.pid.oldbin`

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?

Please Cc me as I am not on the mailing list.

Please also let me know if there is a better place to ask this question.

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