diff src/os/unix/ngx_process.c @ 234:cd71b95716b4

nginx-0.0.1-2004-01-20-23:40:08 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 20 Jan 2004 20:40:08 +0000
parents 2ba3477070ac
children e885208c518b
line wrap: on
line diff
--- a/src/os/unix/ngx_process.c
+++ b/src/os/unix/ngx_process.c
@@ -235,5 +235,13 @@ void ngx_process_get_status()
                           "%s " PID_T_FMT " exited with code %d",
                           process, pid, WEXITSTATUS(status));
         }
+
+        if (WEXITSTATUS(status) == 2 && ngx_processes[i].respawn) {
+            ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0,
+                          "%s " PID_T_FMT
+                          " exited with fatal code %d and could not respawn",
+                          process, pid, WEXITSTATUS(status));
+            ngx_processes[i].respawn = 0;
+        }
     }
 }