30
2014/12
继承未关闭连接 -- ngx_add_inherited_sockets在这一过程中,nginx 将所有继承得到的连接加入到新的监听数组中,以便之后继续监听和使用这些连接// 获取所有继承连接fd的相关信息
if (ngx_add_inherited_sockets(&init_cycle) != NGX_OK) {
return 1;
} 将环境变量中保留的连接加入监听数组// static ngx_int_t ngx_add_inherited_sockets(ngx_cycle_t *cycle)
// 继承环境变量中保留的连接 fd {{{
static ngx_int_t
ngx_add_inherited_sockets(ngx_cycle_t *cycle)
{
u_char *p, *v, *inherited;
ngx_int_t s;
ngx_listening_t *ls;
inherited = (u_char *) getenv(NGINX_VAR);
if (inherited == NULL) {
return NGX_OK;
}
ngx_log_error(NGX_LOG_NOTICE,
#技术帖
#network
#计算机网络
#龙潭书斋