comparison src/core/ngx_cycle.h @ 6930:97c99bb43737

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 07 Mar 2017 18:51:16 +0300
parents 426828549afc
children 84e53e4735a4
comparison
equal deleted inserted replaced
6929:3069dd358ba2 6930:97c99bb43737
86 typedef struct { 86 typedef struct {
87 ngx_flag_t daemon; 87 ngx_flag_t daemon;
88 ngx_flag_t master; 88 ngx_flag_t master;
89 89
90 ngx_msec_t timer_resolution; 90 ngx_msec_t timer_resolution;
91 ngx_msec_t shutdown_timeout;
91 92
92 ngx_int_t worker_processes; 93 ngx_int_t worker_processes;
93 ngx_int_t debug_points; 94 ngx_int_t debug_points;
94 95
95 ngx_int_t rlimit_nofile; 96 ngx_int_t rlimit_nofile;
127 char **ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last); 128 char **ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last);
128 ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv); 129 ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv);
129 ngx_cpuset_t *ngx_get_cpu_affinity(ngx_uint_t n); 130 ngx_cpuset_t *ngx_get_cpu_affinity(ngx_uint_t n);
130 ngx_shm_zone_t *ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name, 131 ngx_shm_zone_t *ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name,
131 size_t size, void *tag); 132 size_t size, void *tag);
133 void ngx_set_shutdown_timer(ngx_cycle_t *cycle);
132 134
133 135
134 extern volatile ngx_cycle_t *ngx_cycle; 136 extern volatile ngx_cycle_t *ngx_cycle;
135 extern ngx_array_t ngx_old_cycles; 137 extern ngx_array_t ngx_old_cycles;
136 extern ngx_module_t ngx_core_module; 138 extern ngx_module_t ngx_core_module;