Hello nginx-devel,
Thank you very much for nginx.
When running nginx in a Solaris zone, I am unable to do a binary upgrade without
fully stopping and starting nginx. When I send the master process a USR2 signal,
it refuses to do the upgrade and writes the following log message:
2011/01/04 16:00:23 [crit] 3818#0: the changing binary signal is ignored: you should shutdown or terminate before either old or new binary's process
After looking at the code, it seems that nginx assumes if the master process's parent
does not have PID == 1, then nginx is not running in stand-alone daemon mode and the
upgrade should not be attempted.
My problem is that in Solaris zones the master process's parent is actually the
zsched process and this never has PID == 1. The real init process is not visible
inside the zone at all.
I am attaching a patch against 0.9.3 that (only if NGX_SOLARIS is defined) checks to
see if a root process can send a signal to init and, if not, assumes we are running
in a zone and goes ahead with the binary upgrade. With this patch I am able to do
0-downtime binary upgrades in Solaris zones with no problems. Any other solutions
would also be appreciated.
Kind regards,
Doug Hoyte
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel