[PATCH] Allow binary upgrades in Solaris zones

doug at hcsw.org doug at hcsw.org
Thu Jan 6 19:45:55 MSK 2011

Hi Maxim,

On Thu, Jan 06, 2011 at 02:53:36AM +0300 or thereabouts, Maxim Dounin wrote:
> Yes, nginx checks if previous upgrade was finished by checking 
> parent pid to be 1.

Thank you for your explanation about this.

Does it also have something to do with preventing an upgrade when running
nginx under daemontools?

"If you never did online upgrade before, this may mean that you run nginx
under daemontools/etc. Thus online upgrade is not available in this case."


> I don't really like this aproach, it looks fragile and actually 
> adds another non-portable hack instead of fixing original 
> non-portability.

I agree it is a hack that relies on non-standard behaviour but I disagree
that it is fragile. My logic behind the patch was that it should:

1) Use only standard unix syscalls so as to not break compilation on any

2) Revert to the current behaviour and refuse upgrade if init process not
   being visible inside zones does not apply.

> Probably passing real parent pid from old binary and checking if 
> getppid() [doesn't] match whould be better aproach (at least, it 
> should be portable).

Now that I understand the purpose behind this test better I agree this
would be a better solution. I will look into creating a patch that
implements this approach and post my results here.

Kind regards,

Doug Hoyte

More information about the nginx-devel mailing list