comparison src/core/nginx.c @ 160:73e8476f9142 NGINX_0_3_27

nginx 0.3.27 *) Change: the "variables_hash_max_size" and "variables_hash_bucket_size" directives. *) Feature: the $body_bytes_sent variable can be used not only in the "log_format" directive. *) Feature: the $ssl_protocol and $ssl_cipher variables. *) Feature: the cache line size detection for widespread CPUs at start time. *) Feature: now the "accept_mutex" directive is supported using fcntl(2) on platforms different from i386, amd64, sparc64, and ppc. *) Feature: the "lock_file" directive and the --with-lock-path=PATH autoconfiguration directive. *) Bugfix: if the HTTPS protocol was used in the "proxy_pass" directive then the requests with the body was not transferred.
author Igor Sysoev <http://sysoev.ru>
date Wed, 08 Feb 2006 00:00:00 +0300
parents 50bd986c5d63
children 13710a1813ad
comparison
equal deleted inserted replaced
159:25c27e983933 160:73e8476f9142
54 { ngx_string("pid"), 54 { ngx_string("pid"),
55 NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1, 55 NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1,
56 ngx_conf_set_str_slot, 56 ngx_conf_set_str_slot,
57 0, 57 0,
58 offsetof(ngx_core_conf_t, pid), 58 offsetof(ngx_core_conf_t, pid),
59 NULL },
60
61 { ngx_string("lock_file"),
62 NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1,
63 ngx_conf_set_str_slot,
64 0,
65 offsetof(ngx_core_conf_t, lock_file),
59 NULL }, 66 NULL },
60 67
61 { ngx_string("worker_processes"), 68 { ngx_string("worker_processes"),
62 NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1, 69 NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1,
63 ngx_conf_set_num_slot, 70 ngx_conf_set_num_slot,
212 init_cycle.pool = ngx_create_pool(1024, log); 219 init_cycle.pool = ngx_create_pool(1024, log);
213 if (init_cycle.pool == NULL) { 220 if (init_cycle.pool == NULL) {
214 return 1; 221 return 1;
215 } 222 }
216 223
217 if (ngx_save_argv(&init_cycle, argc, argv) == NGX_ERROR) { 224 if (ngx_save_argv(&init_cycle, argc, argv) != NGX_OK) {
218 return 1; 225 return 1;
219 } 226 }
220 227
221 if (ngx_getopt(&init_cycle, argc, ngx_argv) == NGX_ERROR) { 228 if (ngx_getopt(&init_cycle, argc, ngx_argv) != NGX_OK) {
222 return 1; 229 return 1;
223 } 230 }
224 231
225 if (ngx_test_config) { 232 if (ngx_test_config) {
226 log->log_level = NGX_LOG_INFO; 233 log->log_level = NGX_LOG_INFO;
227 } 234 }
228 235
229 if (ngx_os_init(log) == NGX_ERROR) { 236 if (ngx_os_init(log) != NGX_OK) {
230 return 1; 237 return 1;
231 } 238 }
232 239
233 if (ngx_add_inherited_sockets(&init_cycle) == NGX_ERROR) { 240 if (ngx_add_inherited_sockets(&init_cycle) != NGX_OK) {
234 return 1; 241 return 1;
235 } 242 }
236 243
237 environ = &ngx_null_environ; 244 environ = &ngx_null_environ;
238 245
272 #if 0 279 #if 0
273 280
274 TODO: 281 TODO:
275 282
276 if (ccf->run_as_service) { 283 if (ccf->run_as_service) {
277 if (ngx_service(cycle->log) == NGX_ERROR) { 284 if (ngx_service(cycle->log) != NGX_OK) {
278 return 1; 285 return 1;
279 } 286 }
280 287
281 return 0; 288 return 0;
282 } 289 }
283 #endif 290 #endif
284 291
285 #else 292 #else
286 293
287 if (ngx_init_signals(cycle->log) == NGX_ERROR) { 294 if (ngx_init_signals(cycle->log) != NGX_OK) {
288 return 1; 295 return 1;
289 } 296 }
290 297
291 if (!ngx_inherited && ccf->daemon) { 298 if (!ngx_inherited && ccf->daemon) {
292 if (ngx_daemon(cycle->log) == NGX_ERROR) { 299 if (ngx_daemon(cycle->log) != NGX_OK) {
293 return 1; 300 return 1;
294 } 301 }
295 302
296 ngx_daemonized = 1; 303 ngx_daemonized = 1;
297 } 304 }
298 305
299 if (ngx_create_pidfile(cycle, NULL) == NGX_ERROR) { 306 if (ngx_create_pidfile(&ccf->pid, cycle->log) != NGX_OK) {
300 return 1; 307 return 1;
301 } 308 }
302 309
303 #endif 310 #endif
304 311
664 } 671 }
665 672
666 ngx_memcpy(ngx_cpymem(ccf->oldpid.data, ccf->pid.data, ccf->pid.len), 673 ngx_memcpy(ngx_cpymem(ccf->oldpid.data, ccf->pid.data, ccf->pid.len),
667 NGX_OLDPID_EXT, sizeof(NGX_OLDPID_EXT)); 674 NGX_OLDPID_EXT, sizeof(NGX_OLDPID_EXT));
668 675
676 if (ccf->lock_file.len == 0) {
677 ccf->lock_file.len = sizeof(NGX_LOCK_PATH) - 1;
678 ccf->lock_file.data = (u_char *) NGX_LOCK_PATH;
679 }
680
681 if (ngx_conf_full_name(cycle, &ccf->lock_file) == NGX_ERROR) {
682 return NGX_CONF_ERROR;
683 }
684
669 #endif 685 #endif
670 686
671 return NGX_CONF_OK; 687 return NGX_CONF_OK;
672 } 688 }
673 689