Mercurial > hg > nginx
comparison src/os/unix/ngx_process.c @ 227:2ba3477070ac
nginx-0.0.1-2004-01-14-21:19:42 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 14 Jan 2004 18:19:42 +0000 |
parents | b0c1e21e68db |
children | cd71b95716b4 |
comparison
equal
deleted
inserted
replaced
226:b0c1e21e68db | 227:2ba3477070ac |
---|---|
104 | 104 |
105 exit(1); | 105 exit(1); |
106 } | 106 } |
107 | 107 |
108 | 108 |
109 void ngx_signal_processes(ngx_cycle_t *cycle, ngx_int_t signo) | 109 #if 0 |
110 | |
111 void ngx_signal_processes(ngx_cycle_t *cycle) | |
110 { | 112 { |
111 ngx_uint_t i; | 113 ngx_uint_t i; |
112 | 114 |
113 for (i = 0; i < ngx_last_process; i++) { | 115 for (i = 0; i < ngx_last_process; i++) { |
114 | 116 |
115 if (!ngx_processes[i].signal) { | 117 if (ngx_processes[i].signal0 == 0) { |
116 continue; | 118 continue; |
117 } | 119 } |
118 | 120 |
119 #if 0 | 121 #if 0 |
120 if (ngx_processes[i].exited) { | 122 if (ngx_processes[i].exited) { |
125 } | 127 } |
126 #endif | 128 #endif |
127 | 129 |
128 ngx_log_debug2(NGX_LOG_DEBUG_CORE, cycle->log, 0, | 130 ngx_log_debug2(NGX_LOG_DEBUG_CORE, cycle->log, 0, |
129 "kill (" PID_T_FMT ", %d)" , | 131 "kill (" PID_T_FMT ", %d)" , |
130 ngx_processes[i].pid, signo); | 132 ngx_processes[i].pid, ngx_processes[i].signal0); |
131 | 133 |
132 if (kill(ngx_processes[i].pid, signo) == -1) { | 134 if (kill(ngx_processes[i].pid, ngx_processes[i].signal0) == -1) { |
133 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, | 135 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, |
134 "kill(%d, %d) failed", ngx_processes[i].pid, signo); | 136 "kill(%d, %d) failed", |
135 continue; | 137 ngx_processes[i].pid, ngx_processes[i].signal0); |
136 } | 138 continue; |
137 | 139 } |
138 if (signo != ngx_signal_value(NGX_REOPEN_SIGNAL)) { | 140 |
141 if (ngx_processes[i].signal0 != ngx_signal_value(NGX_REOPEN_SIGNAL)) { | |
139 ngx_processes[i].exiting = 1; | 142 ngx_processes[i].exiting = 1; |
140 } | 143 } |
141 } | 144 } |
142 } | 145 } |
143 | 146 |
147 #endif | |
148 | |
144 | 149 |
145 void ngx_respawn_processes(ngx_cycle_t *cycle) | 150 void ngx_respawn_processes(ngx_cycle_t *cycle) |
146 { | 151 { |
147 ngx_uint_t i; | 152 ngx_uint_t i; |
148 | 153 |
149 for (i = 0; i < ngx_last_process; i++) { | 154 for (i = 0; i < ngx_last_process; i++) { |
150 ngx_log_debug1(NGX_LOG_DEBUG_CORE, cycle->log, 0, | |
151 "proc table " PID_T_FMT, ngx_processes[i].pid); | |
152 | 155 |
153 if (ngx_processes[i].exiting || !ngx_processes[i].exited) { | 156 if (ngx_processes[i].exiting || !ngx_processes[i].exited) { |
154 continue; | 157 continue; |
155 } | 158 } |
156 | 159 |