summaryrefslogtreecommitdiffhomepage
path: root/src/os/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix')
-rw-r--r--src/os/unix/ngx_process_cycle.c3
-rw-r--r--src/os/unix/ngx_time.c4
-rw-r--r--src/os/unix/ngx_time.h4
3 files changed, 5 insertions, 6 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index c1b2a20d3..41794a877 100644
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -494,6 +494,7 @@ static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data)
}
if (ngx_quit) {
+ ngx_quit = 0;
ngx_log_error(NGX_LOG_INFO, cycle->log, 0,
"gracefully shutting down");
ngx_setproctitle("worker process is shutting down");
@@ -505,9 +506,9 @@ static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data)
}
if (ngx_reopen) {
+ ngx_reopen = 0;
ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopen logs");
ngx_reopen_files(cycle, -1);
- ngx_reopen = 0;
}
}
}
diff --git a/src/os/unix/ngx_time.c b/src/os/unix/ngx_time.c
index 221b64cd5..5ba95bc30 100644
--- a/src/os/unix/ngx_time.c
+++ b/src/os/unix/ngx_time.c
@@ -7,12 +7,12 @@ void ngx_localtime(ngx_tm_t *tm)
{
#if (HAVE_LOCALTIME_R)
- localtime_r(&ngx_cached_time, tm);
+ localtime_r((time_t *) &ngx_cached_time, tm);
#else
ngx_tm_t *t;
- t = localtime(&ngx_cached_time);
+ t = localtime((time_t *) &ngx_cached_time);
*tm = *t;
#endif
diff --git a/src/os/unix/ngx_time.h b/src/os/unix/ngx_time.h
index c84486ed5..bb03e994b 100644
--- a/src/os/unix/ngx_time.h
+++ b/src/os/unix/ngx_time.h
@@ -20,6 +20,7 @@ typedef struct tm ngx_tm_t;
#define ngx_tm_mon tm_mon
#define ngx_tm_year tm_year
#define ngx_tm_wday tm_wday
+#define ngx_tm_gmtoff tm_gmtoff
#ifndef SOLARIS
#define ngx_tm_zone tm_zone
@@ -41,7 +42,4 @@ void ngx_localtime(ngx_tm_t *tm);
#define ngx_msleep(ms) usleep(ms * 1000)
-extern time_t ngx_cached_time;
-
-
#endif /* _NGX_TIME_H_INCLUDED_ */