]> git.kaiwu.me - nginx.git/commit
Fixed "changing binary" when reaper is not init.
authorRuslan Ermilov <ru@nginx.com>
Tue, 28 Nov 2017 09:00:24 +0000 (12:00 +0300)
committerRuslan Ermilov <ru@nginx.com>
Tue, 28 Nov 2017 09:00:24 +0000 (12:00 +0300)
commitafad21917584e9b452ba33ce3485edde5615b859
tree883222e33a8203c4023017f7536b040c48a881cb
parent7a7fc708fb7f6739dc6652ee1f14da1f9e24650d
Fixed "changing binary" when reaper is not init.

On some systems, it's possible that reaper of orphaned processes is
set to something other than "init" process.  On such systems, the
changing binary procedure did not work.

The fix is to check if PPID has changed, instead of assuming it's
always 1 for orphaned processes.
src/core/nginx.c
src/os/unix/ngx_daemon.c
src/os/unix/ngx_process.c
src/os/unix/ngx_process.h
src/os/unix/ngx_process_cycle.c
src/os/win32/ngx_process.h
src/os/win32/ngx_process_cycle.c