Mercurial > hg > nginx
diff src/core/nginx.c @ 253:b6793bc5034b
nginx-0.0.2-2004-02-09-10:46:43 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 09 Feb 2004 07:46:43 +0000 |
parents | 84b1c672ec5a |
children | e6938ca7331a |
line wrap: on
line diff
--- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -377,8 +377,11 @@ static void ngx_master_process_cycle(ngx ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, "can not respawn %s", ngx_processes[i].name); + continue; } + live = 1; + continue; } @@ -443,7 +446,7 @@ static void ngx_master_process_cycle(ngx if (ngx_reopen) { if (ngx_process == NGX_PROCESS_MASTER) { - if (ccf->worker_reopen > 0) { + if (ccf->worker_reopen != 0) { signo = ngx_signal_value(NGX_REOPEN_SIGNAL); ngx_reopen = 0; @@ -461,7 +464,7 @@ static void ngx_master_process_cycle(ngx ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopening logs"); ngx_reopen_files(cycle, - ccf->worker_reopen > 0 ? ccf->user : -1); + ccf->worker_reopen != 0 ? ccf->user : (uid_t) -1); } } @@ -574,6 +577,17 @@ static void ngx_worker_process_cycle(ngx } } +#if (HAVE_PR_SET_DUMPABLE) + + /* allow coredump after setuid() in Linux 2.4.x */ + + if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) { + ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, + "prctl(PR_SET_DUMPABLE) failed"); + } + +#endif + sigemptyset(&set); if (sigprocmask(SIG_SETMASK, &set, NULL) == -1) {