diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-03-13 21:08:07 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-03-13 21:08:07 +0300 |
commit | 2f916a972139be74d437e40bdc7d236401123170 (patch) | |
tree | fcd2498751fa4da54ce7b32cfea08975893d83c9 /src/os | |
parent | b80f68aeda3d958c6c8e52a796fcc561cd9c6e1a (diff) |
*) use previously cached GMT offset value to update time from a signal handler
*) change ngx_time_update() interface since there are no notification methods
those return time
Diffstat (limited to 'src/os')
-rw-r--r-- | src/os/unix/ngx_process.c | 2 | ||||
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 6 | ||||
-rw-r--r-- | src/os/win32/ngx_process.c | 2 | ||||
-rw-r--r-- | src/os/win32/ngx_process_cycle.c | 14 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c index 0d08349ee..4c418000a 100644 --- a/src/os/unix/ngx_process.c +++ b/src/os/unix/ngx_process.c @@ -317,7 +317,7 @@ ngx_signal_handler(int signo) } } - ngx_time_update(0, 0); + ngx_time_update(1); action = ""; diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index 06e020e06..18046384a 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -168,7 +168,7 @@ ngx_master_process_cycle(ngx_cycle_t *cycle) sigsuspend(&set); - ngx_time_update(0, 0); + ngx_time_update(0); ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "wake up, sigio %i", sigio); @@ -1342,7 +1342,7 @@ ngx_cache_manager_process_handler(ngx_event_t *ev) next = (n <= next) ? n : next; - ngx_time_update(0, 0); + ngx_time_update(0); } } @@ -1372,7 +1372,7 @@ ngx_cache_loader_process_handler(ngx_event_t *ev) if (path[i]->loader) { path[i]->loader(path[i]->data); - ngx_time_update(0, 0); + ngx_time_update(0); } } diff --git a/src/os/win32/ngx_process.c b/src/os/win32/ngx_process.c index e57adb484..08d9c0ecf 100644 --- a/src/os/win32/ngx_process.c +++ b/src/os/win32/ngx_process.c @@ -85,7 +85,7 @@ ngx_spawn_process(ngx_cycle_t *cycle, char *name, ngx_int_t respawn) rc = WaitForMultipleObjects(2, events, 0, 5000); - ngx_time_update(0, 0); + ngx_time_update(0); ngx_log_debug1(NGX_LOG_DEBUG_CORE, cycle->log, 0, "WaitForMultipleObjects: %ul", rc); diff --git a/src/os/win32/ngx_process_cycle.c b/src/os/win32/ngx_process_cycle.c index e3b513a1c..e4e92b85c 100644 --- a/src/os/win32/ngx_process_cycle.c +++ b/src/os/win32/ngx_process_cycle.c @@ -140,7 +140,7 @@ ngx_master_process_cycle(ngx_cycle_t *cycle) ev = WaitForMultipleObjects(nev, events, 0, timeout); err = ngx_errno; - ngx_time_update(0, 0); + ngx_time_update(0); ngx_log_debug1(NGX_LOG_DEBUG_CORE, cycle->log, 0, "master WaitForMultipleObjects: %ul", ev); @@ -679,7 +679,7 @@ ngx_worker_process_cycle(ngx_cycle_t *cycle, char *mevn) ev = WaitForMultipleObjects(3, events, 0, INFINITE); err = ngx_errno; - ngx_time_update(0, 0); + ngx_time_update(0); ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "worker WaitForMultipleObjects: %ul", ev); @@ -738,7 +738,7 @@ ngx_worker_process_cycle(ngx_cycle_t *cycle, char *mevn) ev = WaitForMultipleObjects(nev, events, 0, INFINITE); err = ngx_errno; - ngx_time_update(0, 0); + ngx_time_update(0); ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "worker exit WaitForMultipleObjects: %ul", ev); @@ -907,7 +907,7 @@ ngx_cache_manager_thread(void *data) ev = WaitForMultipleObjects(2, events, 0, INFINITE); err = ngx_errno; - ngx_time_update(0, 0); + ngx_time_update(0); ngx_log_debug1(NGX_LOG_DEBUG_CORE, cycle->log, 0, "cache manager WaitForMultipleObjects: %ul", ev); @@ -968,7 +968,7 @@ ngx_cache_manager_process_handler(void) next = (n <= next) ? n : next; - ngx_time_update(0, 0); + ngx_time_update(0); } } @@ -980,7 +980,7 @@ ngx_cache_manager_process_handler(void) if (ev != WAIT_TIMEOUT) { - ngx_time_update(0, 0); + ngx_time_update(0); ngx_log_debug1(NGX_LOG_DEBUG_CORE, ngx_cycle->log, 0, "cache manager WaitForSingleObject: %ul", ev); @@ -1008,7 +1008,7 @@ ngx_cache_loader_thread(void *data) if (path[i]->loader) { path[i]->loader(path[i]->data); - ngx_time_update(0, 0); + ngx_time_update(0); } } |