comparison src/event/modules/ngx_select_module.c @ 3473:0299cf5856fc

do not update time in the timer signal handler, since localtime_r() is not Async-Signal-Safe function
author Igor Sysoev <igor@sysoev.ru>
date Fri, 12 Mar 2010 14:31:47 +0000
parents f94e8ff65aa2
children d4c4cfdffe30
comparison
equal deleted inserted replaced
3472:65481698535c 3473:0299cf5856fc
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(0, 0);
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);