aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_cycle.h
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2017-03-07 18:51:16 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2017-03-07 18:51:16 +0300
commit12b9974d510d38574c6cfb28ee3e87540230c56e (patch)
treecf66752182343de8606a9ac2d9625508d574356b /src/core/ngx_cycle.h
parent1a58418ae76a96c830a0536432e96a9ad051bc58 (diff)
downloadnginx-12b9974d510d38574c6cfb28ee3e87540230c56e.tar.gz
nginx-12b9974d510d38574c6cfb28ee3e87540230c56e.zip
Introduced worker_shutdown_timeout.
The directive configures a timeout to be used when gracefully shutting down worker processes. When the timer expires, nginx will try to close all the connections currently open to facilitate shutdown.
Diffstat (limited to 'src/core/ngx_cycle.h')
-rw-r--r--src/core/ngx_cycle.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h
index d804eb414..2b48ccbd6 100644
--- a/src/core/ngx_cycle.h
+++ b/src/core/ngx_cycle.h
@@ -88,6 +88,7 @@ typedef struct {
ngx_flag_t master;
ngx_msec_t timer_resolution;
+ ngx_msec_t shutdown_timeout;
ngx_int_t worker_processes;
ngx_int_t debug_points;
@@ -129,6 +130,7 @@ ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv);
ngx_cpuset_t *ngx_get_cpu_affinity(ngx_uint_t n);
ngx_shm_zone_t *ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name,
size_t size, void *tag);
+void ngx_set_shutdown_timer(ngx_cycle_t *cycle);
extern volatile ngx_cycle_t *ngx_cycle;