do not update time in the timer signal handler,
since localtime_r() is not Async-Signal-Safe function
This commit is contained in:
parent
8dd13e234f
commit
748e22aa4d
6 changed files with 5 additions and 7 deletions
|
@ -371,7 +371,7 @@ ngx_devpoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
|||
|
||||
err = (events == -1) ? ngx_errno : 0;
|
||||
|
||||
if (flags & NGX_UPDATE_TIME) {
|
||||
if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) {
|
||||
ngx_time_update(0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -531,7 +531,7 @@ ngx_epoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags)
|
|||
|
||||
err = (events == -1) ? ngx_errno : 0;
|
||||
|
||||
if (flags & NGX_UPDATE_TIME) {
|
||||
if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) {
|
||||
ngx_time_update(0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -537,7 +537,7 @@ ngx_kqueue_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
|||
|
||||
err = (events == -1) ? ngx_errno : 0;
|
||||
|
||||
if (flags & NGX_UPDATE_TIME) {
|
||||
if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) {
|
||||
ngx_time_update(0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ ngx_poll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags)
|
|||
|
||||
err = (ready == -1) ? ngx_errno : 0;
|
||||
|
||||
if (flags & NGX_UPDATE_TIME) {
|
||||
if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) {
|
||||
ngx_time_update(0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ ngx_select_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
|||
|
||||
err = (ready == -1) ? ngx_errno : 0;
|
||||
|
||||
if (flags & NGX_UPDATE_TIME) {
|
||||
if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) {
|
||||
ngx_time_update(0, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -562,8 +562,6 @@ ngx_timer_signal_handler(int signo)
|
|||
{
|
||||
ngx_event_timer_alarm = 1;
|
||||
|
||||
ngx_time_update(0, 0);
|
||||
|
||||
#if 1
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ngx_cycle->log, 0, "timer signal");
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue