diff options
Diffstat (limited to 'src/os/unix')
-rw-r--r-- | src/os/unix/ngx_freebsd_init.c | 8 | ||||
-rw-r--r-- | src/os/unix/ngx_linux_init.c | 4 | ||||
-rw-r--r-- | src/os/unix/ngx_posix_init.c | 3 | ||||
-rw-r--r-- | src/os/unix/ngx_process.h | 3 | ||||
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 14 | ||||
-rw-r--r-- | src/os/unix/ngx_setproctitle.c | 1 | ||||
-rw-r--r-- | src/os/unix/ngx_solaris_init.c | 4 |
7 files changed, 25 insertions, 12 deletions
diff --git a/src/os/unix/ngx_freebsd_init.c b/src/os/unix/ngx_freebsd_init.c index 7defb4676..ab002ae29 100644 --- a/src/os/unix/ngx_freebsd_init.c +++ b/src/os/unix/ngx_freebsd_init.c @@ -232,22 +232,22 @@ void ngx_os_status(ngx_log_t *log) { ngx_uint_t i; - ngx_log_error(NGX_LOG_INFO, log, 0, "OS: %s %s", + ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s", ngx_freebsd_kern_ostype, ngx_freebsd_kern_osrelease); #ifdef __DragonFly_version - ngx_log_error(NGX_LOG_INFO, log, 0, + ngx_log_error(NGX_LOG_NOTICE, log, 0, "kern.osreldate: %d, built on %d", ngx_freebsd_kern_osreldate, __DragonFly_version); #else - ngx_log_error(NGX_LOG_INFO, log, 0, + ngx_log_error(NGX_LOG_NOTICE, log, 0, "kern.osreldate: %d, built on %d", ngx_freebsd_kern_osreldate, __FreeBSD_version); #endif for (i = 0; sysctls[i].name; i++) { if (sysctls[i].exists) { - ngx_log_error(NGX_LOG_INFO, log, 0, "%s: %d", + ngx_log_error(NGX_LOG_NOTICE, log, 0, "%s: %d", sysctls[i].name, *sysctls[i].value); } } diff --git a/src/os/unix/ngx_linux_init.c b/src/os/unix/ngx_linux_init.c index 6cb2449fa..56d9f1523 100644 --- a/src/os/unix/ngx_linux_init.c +++ b/src/os/unix/ngx_linux_init.c @@ -81,10 +81,10 @@ ngx_os_init(ngx_log_t *log) void ngx_os_status(ngx_log_t *log) { - ngx_log_error(NGX_LOG_INFO, log, 0, "OS: %s %s", + ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s", ngx_linux_kern_ostype, ngx_linux_kern_osrelease); - ngx_log_error(NGX_LOG_INFO, log, 0, "sysctl(KERN_RTSIGMAX): %d", + ngx_log_error(NGX_LOG_NOTICE, log, 0, "sysctl(KERN_RTSIGMAX): %d", ngx_linux_rtsig_max); diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c index a66560acb..d0de5d5f6 100644 --- a/src/os/unix/ngx_posix_init.c +++ b/src/os/unix/ngx_posix_init.c @@ -6,7 +6,6 @@ #include <ngx_config.h> #include <ngx_core.h> -#include <ngx_setproctitle.h> ngx_int_t ngx_ncpu; @@ -137,7 +136,7 @@ ngx_int_t ngx_posix_init(ngx_log_t *log) void ngx_posix_status(ngx_log_t *log) { - ngx_log_error(NGX_LOG_INFO, log, 0, + ngx_log_error(NGX_LOG_NOTICE, log, 0, "getrlimit(RLIMIT_NOFILE): %r:%r", rlmt.rlim_cur, rlmt.rlim_max); } diff --git a/src/os/unix/ngx_process.h b/src/os/unix/ngx_process.h index b85c528d1..25bfa9604 100644 --- a/src/os/unix/ngx_process.h +++ b/src/os/unix/ngx_process.h @@ -8,6 +8,9 @@ #define _NGX_PROCESS_H_INCLUDED_ +#include <ngx_setproctitle.h> + + typedef pid_t ngx_pid_t; typedef void (*ngx_spawn_proc_pt) (ngx_cycle_t *cycle, void *data); diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index d3c92a1b6..9d0569411 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -7,7 +7,6 @@ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> -#include <ngx_setproctitle.h> #include <ngx_channel.h> @@ -69,11 +68,13 @@ ngx_master_process_cycle(ngx_cycle_t *cycle) u_char *p; size_t size; ngx_int_t i; + ngx_uint_t n; sigset_t set; struct timeval tv; struct itimerval itv; ngx_uint_t live; ngx_msec_t delay; + ngx_listening_t *ls; ngx_core_conf_t *ccf; sigemptyset(&set); @@ -179,6 +180,17 @@ ngx_master_process_cycle(ngx_cycle_t *cycle) if (ngx_quit) { ngx_signal_worker_processes(cycle, ngx_signal_value(NGX_SHUTDOWN_SIGNAL)); + + ls = cycle->listening.elts; + for (n = 0; n < cycle->listening.nelts; n++) { + if (ngx_close_socket(ls[n].fd) == -1) { + ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_socket_errno, + ngx_close_socket_n " %V failed", + &ls[n].addr_text); + } + } + cycle->listening.nelts = 0; + continue; } diff --git a/src/os/unix/ngx_setproctitle.c b/src/os/unix/ngx_setproctitle.c index 8ae643d9b..b814610b7 100644 --- a/src/os/unix/ngx_setproctitle.c +++ b/src/os/unix/ngx_setproctitle.c @@ -6,7 +6,6 @@ #include <ngx_config.h> #include <ngx_core.h> -#include <ngx_setproctitle.h> #if (NGX_SETPROCTITLE_USES_ENV) diff --git a/src/os/unix/ngx_solaris_init.c b/src/os/unix/ngx_solaris_init.c index 9080eb20c..163adaae9 100644 --- a/src/os/unix/ngx_solaris_init.c +++ b/src/os/unix/ngx_solaris_init.c @@ -61,10 +61,10 @@ ngx_int_t ngx_os_init(ngx_log_t *log) void ngx_os_status(ngx_log_t *log) { - ngx_log_error(NGX_LOG_INFO, log, 0, "OS: %s %s", + ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s", ngx_solaris_sysname, ngx_solaris_release); - ngx_log_error(NGX_LOG_INFO, log, 0, "version: %s", + ngx_log_error(NGX_LOG_NOTICE, log, 0, "version: %s", ngx_solaris_version); ngx_posix_status(log); |