Re: [PATCH] initialize signal handlers before writing pid file

2010-01-20 Thread Iñaki Baz Castillo
El Miércoles, 20 de Enero de 2010, Eric Wong escribió: This prevents trigger-happy init scripts from reading the pid file (and thus sending signals) to a not-fully initialized master process to handle them. This does NOT fix anything if other processes are sending signals prematurely

Suggestion for reload action (USR2)

2010-01-20 Thread Iñaki Baz Castillo
Hi, when Unicorn receives a USR2 it invokes the original script and arguments and creates a new master as a child. However when running this new master there could be something to treat different as when we run Unicorn for first time. For example: - In the initial unicorn master I want it to

Re: Suggestion for reload action (USR2)

2010-01-20 Thread Iñaki Baz Castillo
El Miércoles, 20 de Enero de 2010, Iñaki Baz Castillo escribió: This would involve just three changes: - Add an option --reload in OptionParser in bin/unicorn. - Store such option somewhere so it can be readed later by the Rack application or other library. - Add --reload to the list of

Re: Suggestion for reload action (USR2)

2010-01-20 Thread Iñaki Baz Castillo
El Miércoles, 20 de Enero de 2010, Eric Wong escribió: All you need to do is to check for the presence of ENV[UNICORN_FD] which is used to communicate file descriptor numbers for the upgrade process Great, I didn't know it! :) I attach a patch (for master branch) that would do the job