diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-01-20 20:40:08 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-01-20 20:40:08 +0000 |
commit | 03420a621ae7f0b7ca37d37b33ff9ae8277dda49 (patch) | |
tree | 79907192a7774ea974f0ffc734e3e7caaa6a4b99 /src/os/unix | |
parent | a1c8a92566ab0bbb8c58c06038474670aca52407 (diff) | |
download | nginx-03420a621ae7f0b7ca37d37b33ff9ae8277dda49.tar.gz nginx-03420a621ae7f0b7ca37d37b33ff9ae8277dda49.zip |
nginx-0.0.1-2004-01-20-23:40:08 import
Diffstat (limited to 'src/os/unix')
-rw-r--r-- | src/os/unix/ngx_freebsd_config.h | 1 | ||||
-rw-r--r-- | src/os/unix/ngx_process.c | 8 |
2 files changed, 9 insertions, 0 deletions
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 <arpa/inet.h> #include <netdb.h> #include <pwd.h> +#include <grp.h> #include <osreldate.h> 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; + } } } |