diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2012-08-06 16:24:22 +0000 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-08-06 16:24:22 +0000 |
commit | 7ca2e6d24e16c55cc336d1c86c9bc315d2199321 (patch) | |
tree | ee30f5545db60b9e390902950835dc15849f53e0 /src | |
parent | 09c6ff334e1110bf2ef3ec6015a33ee676e9e713 (diff) | |
download | nginx-7ca2e6d24e16c55cc336d1c86c9bc315d2199321.tar.gz nginx-7ca2e6d24e16c55cc336d1c86c9bc315d2199321.zip |
Merge of r4758: win32: fixed cpu hog after process startup failure.
If ngx_spawn_process() failed while starting a process, the process
handle was closed but left non-NULL in the ngx_processes[] array.
The handle later was used in WaitForMultipleObjects() (if there
were multiple worker processes configured and at least one worker
process was started successfully), resulting in infinite loop.
Reported by Ricardo Villalobos Guevara:
http://mailman.nginx.org/pipermail/nginx-devel/2012-July/002494.html
Diffstat (limited to 'src')
-rw-r--r-- | src/os/win32/ngx_process.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/os/win32/ngx_process.c b/src/os/win32/ngx_process.c index 87e8f9a2a..67c6b121a 100644 --- a/src/os/win32/ngx_process.c +++ b/src/os/win32/ngx_process.c @@ -196,6 +196,7 @@ failed: if (ngx_processes[s].handle) { ngx_close_handle(ngx_processes[s].handle); + ngx_processes[s].handle = NULL; } return NGX_INVALID_PID; |