diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-07-07 23:48:31 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-07-07 23:48:31 +0400 |
commit | 8e811c11b96bafca446404c6256d8edbb01900b0 (patch) | |
tree | d5d1c81259b76c997da6635192eb33b9dfc6048e /src | |
parent | 2b97993c7a6525bf41c694414450943d39605757 (diff) |
nginx-0.0.7-2004-07-07-23:48:31 import
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ngx_config.h | 6 | ||||
-rw-r--r-- | src/event/modules/ngx_rtsig_module.c | 9 | ||||
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 2 | ||||
-rw-r--r-- | src/os/unix/ngx_thread.h | 4 |
4 files changed, 17 insertions, 4 deletions
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h index a6e5b092a..6e381f50d 100644 --- a/src/core/ngx_config.h +++ b/src/core/ngx_config.h @@ -41,8 +41,14 @@ #define NGX_TERMINATE_SIGNAL TERM #define NGX_NOACCEPT_SIGNAL WINCH #define NGX_RECONFIGURE_SIGNAL HUP + +#if (NGX_LINUXTHREADS) +#define NGX_REOPEN_SIGNAL INFO +#define NGX_CHANGEBIN_SIGNAL XCPU +#else #define NGX_REOPEN_SIGNAL USR1 #define NGX_CHANGEBIN_SIGNAL USR2 +#endif #endif diff --git a/src/event/modules/ngx_rtsig_module.c b/src/event/modules/ngx_rtsig_module.c index 9d1e1b9c3..517c1a0a1 100644 --- a/src/event/modules/ngx_rtsig_module.c +++ b/src/event/modules/ngx_rtsig_module.c @@ -363,6 +363,9 @@ ngx_int_t ngx_rtsig_process_events(ngx_cycle_t *cycle) if (signo == -1) { err = ngx_errno; + ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, err, + "rtsig signo:%d", signo); + if (err == NGX_EAGAIN) { if (timer == NGX_TIMER_INFINITE) { @@ -377,6 +380,9 @@ ngx_int_t ngx_rtsig_process_events(ngx_cycle_t *cycle) } else { err = 0; + ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0, + "rtsig signo:%d fd:%d band:%X", + signo, si.si_fd, si.si_band); } ngx_gettimeofday(&tv); @@ -399,9 +405,6 @@ ngx_int_t ngx_rtsig_process_events(ngx_cycle_t *cycle) "rtsig timer: %d, delta: %d", timer, (int) delta); } - ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0, - "rtsig signo:%d fd:%d band:%X", signo, si.si_fd, si.si_band); - rtscf = ngx_event_get_conf(ngx_cycle->conf_ctx, ngx_rtsig_module); if (signo == rtscf->signo || signo == rtscf->signo + 1) { diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index 433c4f073..83b8da8c2 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -858,7 +858,7 @@ static void* ngx_worker_thread_cycle(void *data) return (void *) 1; } - ngx_log_debug1(NGX_LOG_DEBUG_CORE, cycle->log, ngx_errno, + ngx_log_debug1(NGX_LOG_DEBUG_CORE, cycle->log, 0, "thread " TID_T_FMT " started", ngx_thread_self()); ngx_setthrtitle("worker thread"); diff --git a/src/os/unix/ngx_thread.h b/src/os/unix/ngx_thread.h index eb5c33f85..b779de060 100644 --- a/src/os/unix/ngx_thread.h +++ b/src/os/unix/ngx_thread.h @@ -22,7 +22,11 @@ typedef pthread_t ngx_tid_t; #define ngx_thread_self() pthread_self() #define ngx_log_tid (int) ngx_thread_self() +#if defined(__FreeBSD__) && !defined(NGX_LINUXTHREADS) #define TID_T_FMT PTR_FMT +#else +#define TID_T_FMT "%d" +#endif typedef pthread_key_t ngx_tls_key_t; |