mirror of
https://github.com/nginx/nginx.git
synced 2026-10-21 19:41:35 +00:00
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 V G: http://mailman.nginx.org/pipermail/nginx-devel/2012-July/002494.html
This commit is contained in:
parent
54ab41f27b
commit
9d5f5a0c76
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue