Upgrading Nginx executable on the fly

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrading Nginx executable on the fly

ayman
Hi,

We have been trying to upgrade the Nginx binary on the fly by invoking USR2
signal to spawn a new set of master and worker processes with the new
configuration. The question I have is when this new master process is
spawned, after issuing USR2 signal to the existing or the old master
process, what would be it's parent process? Will it be the root process (1)
or the old master process?

We have been seeing different case of this. In some cases we have seen the
new master process' PPID is 1, whereas in other cases its PPID is that of
the old master process.

Could someone please explain this scenario in detail.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,278038,278038#msg-278038

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading Nginx executable on the fly

Zhang Chao
> We have been trying to upgrade the Nginx binary on the fly by invoking USR2 
> signal to spawn a new set of master and worker processes with the new 
> configuration. The question I have is when this new master process is 
> spawned, after issuing USR2 signal to the existing or the old master 
> process, what would be it's parent process? Will it be the root process (1) 
> or the old master process? 
>
> We have been seeing different case of this. In some cases we have seen the 
> new master process' PPID is 1, whereas in other cases its PPID is that of 
> the old master process. 

The new master’s parent is the old master before you quit the old master process, 
after it quits, the new master’s parent process will be the init process.

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx