[nginx] svn commit: r4758 - trunk/src/os/win32

mdounin at mdounin.ru mdounin at mdounin.ru
Mon Jul 23 16:37:25 UTC 2012

Author: mdounin
Date: 2012-07-23 16:37:24 +0000 (Mon, 23 Jul 2012)
New Revision: 4758
URL: http://trac.nginx.org/nginx/changeset/4758/nginx

Win32: fixed cpu hog after process startup failure.

If ngx_spawn_process() failed while starting a process, the handle of a
handle of a processes 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:


Modified: trunk/src/os/win32/ngx_process.c
--- trunk/src/os/win32/ngx_process.c	2012-07-20 08:21:59 UTC (rev 4757)
+++ trunk/src/os/win32/ngx_process.c	2012-07-23 16:37:24 UTC (rev 4758)
@@ -196,6 +196,7 @@
     if (ngx_processes[s].handle) {
+        ngx_processes[s].handle = NULL;
     return NGX_INVALID_PID;

More information about the nginx-devel mailing list