comparison src/os/win32/ngx_process_cycle.c @ 7162:8b84d60ef13d

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.
author Ruslan Ermilov <ru@nginx.com>
date Tue, 28 Nov 2017 12:00:24 +0300
parents 97c99bb43737
children b809f53d3f5b
comparison
equal deleted inserted replaced
7161:325b3042edd6 7162:8b84d60ef13d
29 29
30 30
31 ngx_uint_t ngx_process; 31 ngx_uint_t ngx_process;
32 ngx_uint_t ngx_worker; 32 ngx_uint_t ngx_worker;
33 ngx_pid_t ngx_pid; 33 ngx_pid_t ngx_pid;
34 ngx_pid_t ngx_parent;
34 35
35 ngx_uint_t ngx_inherited; 36 ngx_uint_t ngx_inherited;
36 ngx_pid_t ngx_new_binary; 37 ngx_pid_t ngx_new_binary;
37 38
38 sig_atomic_t ngx_terminate; 39 sig_atomic_t ngx_terminate;