Mercurial > hg > nginx
comparison src/os/unix/ngx_process.c @ 306:6b91bfbc4123
nginx-0.0.3-2004-04-05-00:32:09 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 04 Apr 2004 20:32:09 +0000 |
parents | b79f021a644a |
children | 56496082668b |
comparison
equal
deleted
inserted
replaced
305:4b1a3a4acc60 | 306:6b91bfbc4123 |
---|---|
1 | 1 |
2 #include <ngx_config.h> | 2 #include <ngx_config.h> |
3 #include <ngx_core.h> | 3 #include <ngx_core.h> |
4 #include <ngx_event.h> | |
4 | 5 |
5 | 6 |
6 static void ngx_execute_proc(ngx_cycle_t *cycle, void *data); | 7 static void ngx_execute_proc(ngx_cycle_t *cycle, void *data); |
7 | 8 |
8 ngx_uint_t ngx_last_process; | 9 ngx_uint_t ngx_last_process; |
140 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, errno, | 141 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, errno, |
141 "waitpid() failed"); | 142 "waitpid() failed"); |
142 return; | 143 return; |
143 } | 144 } |
144 | 145 |
146 | |
147 if (ngx_accept_mutex_ptr) { | |
148 | |
149 /* | |
150 * unlock the accept mutex if the abnormally exited process | |
151 * held it | |
152 */ | |
153 | |
154 ngx_atomic_cmp_set(ngx_accept_mutex_ptr, pid, 0); | |
155 } | |
156 | |
157 | |
145 one = 1; | 158 one = 1; |
146 process = ""; | 159 process = ""; |
147 | 160 |
148 for (i = 0; i < ngx_last_process; i++) { | 161 for (i = 0; i < ngx_last_process; i++) { |
149 if (ngx_processes[i].pid == pid) { | 162 if (ngx_processes[i].pid == pid) { |