Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_process_cycle.c @ 3035:f9d97311c652
*) share temporary number between workers
*) randomize collision offset
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 21 Aug 2009 09:06:35 +0000 |
parents | f4b5c787fe33 |
children | 52e984126b2c |
comparison
equal
deleted
inserted
replaced
3034:d7f7aabe5ac2 | 3035:f9d97311c652 |
---|---|
275 void | 275 void |
276 ngx_single_process_cycle(ngx_cycle_t *cycle) | 276 ngx_single_process_cycle(ngx_cycle_t *cycle) |
277 { | 277 { |
278 ngx_uint_t i; | 278 ngx_uint_t i; |
279 | 279 |
280 ngx_init_temp_number(); | |
281 | |
282 for (i = 0; ngx_modules[i]; i++) { | 280 for (i = 0; ngx_modules[i]; i++) { |
283 if (ngx_modules[i]->init_process) { | 281 if (ngx_modules[i]->init_process) { |
284 if (ngx_modules[i]->init_process(cycle) == NGX_ERROR) { | 282 if (ngx_modules[i]->init_process(cycle) == NGX_ERROR) { |
285 /* fatal */ | 283 /* fatal */ |
286 exit(2); | 284 exit(2); |
928 if (sigprocmask(SIG_SETMASK, &set, NULL) == -1) { | 926 if (sigprocmask(SIG_SETMASK, &set, NULL) == -1) { |
929 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, | 927 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, |
930 "sigprocmask() failed"); | 928 "sigprocmask() failed"); |
931 } | 929 } |
932 | 930 |
933 ngx_init_temp_number(); | |
934 | |
935 /* | 931 /* |
936 * disable deleting previous events for the listening sockets because | 932 * disable deleting previous events for the listening sockets because |
937 * in the worker processes there are no events at all at this point | 933 * in the worker processes there are no events at all at this point |
938 */ | 934 */ |
939 ls = cycle->listening.elts; | 935 ls = cycle->listening.elts; |