comparison src/os/unix/ngx_process_cycle.c @ 136:3656228c0b56 NGINX_0_3_15

nginx 0.3.15 *) Feature: the new 444 code of the "return" directive to close connection. *) Feature: the "so_keepalive" directive in IMAP/POP3 proxy. *) Bugfix: if there are unclosed connection nginx now calls abort() only on gracefull quit and active "debug_points" directive.
author Igor Sysoev <http://sysoev.ru>
date Wed, 07 Dec 2005 00:00:00 +0300
parents df17fbafec8f
children 8e6d4d96ec4c
comparison
equal deleted inserted replaced
135:c1ac76c0e9df 136:3656228c0b56
936 if (ngx_modules[i]->exit_process) { 936 if (ngx_modules[i]->exit_process) {
937 ngx_modules[i]->exit_process(cycle); 937 ngx_modules[i]->exit_process(cycle);
938 } 938 }
939 } 939 }
940 940
941 c = cycle->connections; 941 if (ngx_quit) {
942 for (i = 0; i < cycle->connection_n; i++) { 942 c = cycle->connections;
943 if (c[i].fd != -1 943 for (i = 0; i < cycle->connection_n; i++) {
944 && c[i].read 944 if (c[i].fd != -1
945 && !c[i].read->accept 945 && c[i].read
946 && !c[i].read->channel) 946 && !c[i].read->accept
947 { 947 && !c[i].read->channel)
948 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, 948 {
949 "open socket #%d left in %ui connection, " 949 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
950 "aborting", 950 "open socket #%d left in %ui connection, "
951 c[i].fd, i); 951 "aborting",
952 ngx_abort(); 952 c[i].fd, i);
953 } 953 ngx_debug_point();
954 } 954 }
955 955 }
956 if (ngx_debug_quit) { 956
957 ngx_debug_point(); 957 if (ngx_debug_quit) {
958 ngx_debug_point();
959 }
958 } 960 }
959 961
960 /* 962 /*
961 * we do not destroy cycle->pool here because a signal handler 963 * we do not destroy cycle->pool here because a signal handler
962 * that uses cycle->log can be called at this point 964 * that uses cycle->log can be called at this point