Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_process_cycle.c @ 5499:b91bcba29351
Added per-process random seeding (ticket #456).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 04 Jan 2014 03:32:06 +0400 |
parents | 8e7db77e5d88 |
children | e45fa57ef725 |
comparison
equal
deleted
inserted
replaced
5498:d39a69427056 | 5499:b91bcba29351 |
---|---|
957 if (sigprocmask(SIG_SETMASK, &set, NULL) == -1) { | 957 if (sigprocmask(SIG_SETMASK, &set, NULL) == -1) { |
958 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, | 958 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, |
959 "sigprocmask() failed"); | 959 "sigprocmask() failed"); |
960 } | 960 } |
961 | 961 |
962 srandom((ngx_pid << 16) ^ ngx_time()); | |
963 | |
962 /* | 964 /* |
963 * disable deleting previous events for the listening sockets because | 965 * disable deleting previous events for the listening sockets because |
964 * in the worker processes there are no events at all at this point | 966 * in the worker processes there are no events at all at this point |
965 */ | 967 */ |
966 ls = cycle->listening.elts; | 968 ls = cycle->listening.elts; |