comparison src/event/modules/ngx_select_module.c @ 665:0b460e61bdcd default tip

Merge with nginx 1.0.0.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 25 Apr 2011 04:22:17 +0400
parents be4f34123024
children
comparison
equal deleted inserted replaced
572:06419a2298a9 665:0b460e61bdcd
79 FD_ZERO(&master_read_fd_set); 79 FD_ZERO(&master_read_fd_set);
80 FD_ZERO(&master_write_fd_set); 80 FD_ZERO(&master_write_fd_set);
81 nevents = 0; 81 nevents = 0;
82 } 82 }
83 83
84 if (ngx_process == NGX_PROCESS_WORKER 84 if (ngx_process >= NGX_PROCESS_WORKER
85 || cycle->old_cycle == NULL 85 || cycle->old_cycle == NULL
86 || cycle->old_cycle->connection_n < cycle->connection_n) 86 || cycle->old_cycle->connection_n < cycle->connection_n)
87 { 87 {
88 index = ngx_alloc(sizeof(ngx_event_t *) * 2 * cycle->connection_n, 88 index = ngx_alloc(sizeof(ngx_event_t *) * 2 * cycle->connection_n,
89 cycle->log); 89 cycle->log);
260 260
261 ready = select(max_fd + 1, &work_read_fd_set, &work_write_fd_set, NULL, tp); 261 ready = select(max_fd + 1, &work_read_fd_set, &work_write_fd_set, NULL, tp);
262 262
263 err = (ready == -1) ? ngx_errno : 0; 263 err = (ready == -1) ? ngx_errno : 0;
264 264
265 if (flags & NGX_UPDATE_TIME) { 265 if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) {
266 ngx_time_update(0, 0); 266 ngx_time_update();
267 } 267 }
268 268
269 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, 269 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
270 "select ready %d", ready); 270 "select ready %d", ready);
271 271