diff options
author | Ruslan Ermilov <ru@nginx.com> | 2017-11-28 12:00:24 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2017-11-28 12:00:24 +0300 |
commit | afad21917584e9b452ba33ce3485edde5615b859 (patch) | |
tree | 883222e33a8203c4023017f7536b040c48a881cb /src/os/win32/ngx_process_cycle.c | |
parent | 7a7fc708fb7f6739dc6652ee1f14da1f9e24650d (diff) | |
download | nginx-afad21917584e9b452ba33ce3485edde5615b859.tar.gz nginx-afad21917584e9b452ba33ce3485edde5615b859.zip |
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.
Diffstat (limited to 'src/os/win32/ngx_process_cycle.c')
-rw-r--r-- | src/os/win32/ngx_process_cycle.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/os/win32/ngx_process_cycle.c b/src/os/win32/ngx_process_cycle.c index 293b967ec..3aea874e0 100644 --- a/src/os/win32/ngx_process_cycle.c +++ b/src/os/win32/ngx_process_cycle.c @@ -31,6 +31,7 @@ static ngx_thread_value_t __stdcall ngx_cache_loader_thread(void *data); ngx_uint_t ngx_process; ngx_uint_t ngx_worker; ngx_pid_t ngx_pid; +ngx_pid_t ngx_parent; ngx_uint_t ngx_inherited; ngx_pid_t ngx_new_binary; |