From 03420a621ae7f0b7ca37d37b33ff9ae8277dda49 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 20 Jan 2004 20:40:08 +0000 Subject: nginx-0.0.1-2004-01-20-23:40:08 import --- src/os/unix/ngx_freebsd_config.h | 1 + src/os/unix/ngx_process.c | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'src/os/unix') diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h index ce5c3b692..9fc14b3a9 100644 --- a/src/os/unix/ngx_freebsd_config.h +++ b/src/os/unix/ngx_freebsd_config.h @@ -25,6 +25,7 @@ #include #include #include +#include #include diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c index 2f0d5c31f..bad9a324c 100644 --- 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; + } } } -- cgit