mirror of
https://github.com/nginx/nginx.git
synced 2025-01-19 01:42:58 +08:00
do not update time in the timer signal handler,
since localtime_r() is not Async-Signal-Safe function
This commit is contained in:
parent
9eaabc69ca
commit
b80f68aeda
@ -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 New Issue
Block a user