Nginx does not re-open log files on SIGUSR1.
John Feuerstein
john at feurix.com
Mon Jan 3 18:19:44 MSK 2011
Hi Piotr!
> Pretty much every daemon supports "the standard way" for control
> (graceful restarts, termination, reloads, etc), so people that use other
> daemons prefer to use the method that is consistent among all of them
> instead of using daemon-specific one.
I don't argue that the most common set of signals and their similar
handlers in various daemons (HUP=reload, TERM=clean shutdown,
QUIT=graceful shutdown...) make life a lot easier for most administrators.
But I'm not convinced that this is the case here. As soon as USR* and
whatever other custom signals are handled in a way that is special to
the specific daemon, there's not really a point to "consistency" any
more. It _is_ special already.
And IMHO this is exactly the time where a control CLI can shine,
especially since the available signals are limited and the possible
control knobs are not.
Apache has apachectl[1] or httpd's "-k" option for quite some time now.
It is used by many distributions in init scripts and log rotation
scripts instead of hardcoding signals and paths to pid files everywhere.
Nginx has the "-s" option. For me, this appears to be cleaner and
simpler than to remember or always look up what custom signal X does to
this daemon. For the most basic set of control signals I agree with you,
but it still has the downside of having to find the pid first (and
hardcoding parameters of the daemon configuration into external scripts).
[1] http://httpd.apache.org/docs/2.2/programs/apachectl.html
More information about the nginx
mailing list