comparison src/core/nginx.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 69f9ee0342db
children fdd6a070d518
comparison
equal deleted inserted replaced
7161:325b3042edd6 7162:8b84d60ef13d
226 #if (NGX_PCRE) 226 #if (NGX_PCRE)
227 ngx_regex_init(); 227 ngx_regex_init();
228 #endif 228 #endif
229 229
230 ngx_pid = ngx_getpid(); 230 ngx_pid = ngx_getpid();
231 ngx_parent = ngx_getppid();
231 232
232 log = ngx_log_init(ngx_prefix); 233 log = ngx_log_init(ngx_prefix);
233 if (log == NULL) { 234 if (log == NULL) {
234 return 1; 235 return 1;
235 } 236 }