diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-10-21 15:34:38 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-10-21 15:34:38 +0000 |
commit | c0edbcce58b03b89c70f1eb39cb44c74c4c7453a (patch) | |
tree | 1ce72a5b51d724a0c054e079c2b1507ca85a145d /src/os/unix/ngx_process_cycle.c | |
parent | ac64333a44f39d5a658832517a106961f32f6aae (diff) | |
download | nginx-c0edbcce58b03b89c70f1eb39cb44c74c4c7453a.tar.gz nginx-c0edbcce58b03b89c70f1eb39cb44c74c4c7453a.zip |
nginx-0.1.2-RELEASE importrelease-0.1.2
*) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS
options in configure.
*) Feature: the server_name directive supports *.domain.tld.
*) Bugfix: the portability improvements.
*) Bugfix: if configuration file was set in command line, the
reconfiguration was impossible; the bug had appeared in 0.1.1.
*) Bugfix: proxy module may get caught in an endless loop when sendfile
is not used.
*) Bugfix: with sendfile the response was not recoded according to the
charset module directives; the bug had appeared in 0.1.1.
*) Bugfix: very seldom bug in the kqueue processing.
*) Bugfix: the gzip module compressed the proxied responses that was
already compressed.
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index c43a7eb00..1da491526 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -175,11 +175,14 @@ void ngx_master_process_cycle(ngx_cycle_t *cycle) if (ngx_timer) { ngx_timer = 0; - ngx_start_worker_processes(cycle, ccf->worker_processes, - NGX_PROCESS_JUST_RESPAWN); - live = 1; - ngx_signal_worker_processes(cycle, + + if (!ngx_noaccepting) { + ngx_start_worker_processes(cycle, ccf->worker_processes, + NGX_PROCESS_JUST_RESPAWN); + live = 1; + ngx_signal_worker_processes(cycle, ngx_signal_value(NGX_SHUTDOWN_SIGNAL)); + } } if (ngx_reconfigure) { @@ -578,16 +581,14 @@ static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data) ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); - if (ccf->group != (gid_t) NGX_CONF_UNSET) { + if (geteuid() == 0) { if (setgid(ccf->group) == -1) { ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, "setgid(%d) failed", ccf->group); /* fatal */ exit(2); } - } - if (ccf->user != (uid_t) NGX_CONF_UNSET) { if (setuid(ccf->user) == -1) { ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, "setuid(%d) failed", ccf->user); @@ -596,7 +597,7 @@ static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data) } } -#if (HAVE_PR_SET_DUMPABLE) +#if (NGX_HAVE_PR_SET_DUMPABLE) /* allow coredump after setuid() in Linux 2.4.x */ |