comparison src/os/unix/ngx_process_cycle.c @ 278:704622b2528a NGINX_0_5_9

nginx 0.5.9 *) Change: now the ngx_http_memcached_module uses the $memcached_key variable value as a key. *) Feature: the $memcached_key variable. *) Feature: the "clean" parameter in the "client_body_in_file_only" directive. *) Feature: the "env" directive. *) Feature: the "sendfile" directive is available inside the "if" block. *) Feature: now on failure of the writing to access nginx logs a message to error_log, but not more often than once a minute. *) Bugfix: the "access_log off" directive did not always turn off the logging.
author Igor Sysoev <http://sysoev.ru>
date Thu, 25 Jan 2007 00:00:00 +0300
parents 6eb1e38f0f1f
children f745bf973510
comparison
equal deleted inserted replaced
277:b3aec7787b8e 278:704622b2528a
755 755
756 756
757 static void 757 static void
758 ngx_worker_process_init(ngx_cycle_t *cycle, ngx_uint_t priority) 758 ngx_worker_process_init(ngx_cycle_t *cycle, ngx_uint_t priority)
759 { 759 {
760 sigset_t set; 760 sigset_t set;
761 ngx_int_t n; 761 ngx_int_t n;
762 ngx_uint_t i; 762 ngx_uint_t i;
763 struct rlimit rlmt; 763 struct rlimit rlmt;
764 ngx_core_conf_t *ccf; 764 ngx_core_conf_t *ccf;
765 ngx_listening_t *ls; 765 ngx_listening_t *ls;
766 766
767 ngx_process = NGX_PROCESS_WORKER; 767 ngx_process = NGX_PROCESS_WORKER;
768
769 if (ngx_set_environment(cycle, NULL) == NULL) {
770 /* fatal */
771 exit(2);
772 }
768 773
769 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); 774 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
770 775
771 if (geteuid() == 0) { 776 if (geteuid() == 0) {
772 if (priority && ccf->priority != 0) { 777 if (priority && ccf->priority != 0) {