Mercurial > hg > nginx
comparison src/os/unix/ngx_freebsd_rfork_thread.c @ 377:41437e4fd9b4
nginx-0.0.7-2004-07-05-19:08:23 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 05 Jul 2004 15:08:23 +0000 |
parents | d0451e402e27 |
children | 73688d5d7fc3 |
comparison
equal
deleted
inserted
replaced
376:d0451e402e27 | 377:41437e4fd9b4 |
---|---|
674 } | 674 } |
675 | 675 |
676 | 676 |
677 ngx_int_t ngx_cond_signal(ngx_cond_t *cv) | 677 ngx_int_t ngx_cond_signal(ngx_cond_t *cv) |
678 { | 678 { |
679 ngx_err_t err; | |
680 | |
679 ngx_log_debug3(NGX_LOG_DEBUG_CORE, cv->log, 0, | 681 ngx_log_debug3(NGX_LOG_DEBUG_CORE, cv->log, 0, |
680 "cv " PTR_FMT " to signal " PID_T_FMT " %d", | 682 "cv " PTR_FMT " to signal " PID_T_FMT " %d", |
681 cv, cv->tid, cv->signo); | 683 cv, cv->tid, cv->signo); |
682 | 684 |
683 if (kill(cv->tid, cv->signo) == -1) { | 685 if (kill(cv->tid, cv->signo) == -1) { |
684 ngx_log_error(NGX_LOG_ALERT, cv->log, ngx_errno, | 686 |
687 err = ngx_errno; | |
688 | |
689 ngx_log_error(NGX_LOG_ALERT, cv->log, err, | |
685 "kill() failed while signaling condition variable " | 690 "kill() failed while signaling condition variable " |
686 PTR_FMT, cv); | 691 PTR_FMT, cv); |
692 | |
693 if (err == NGX_ESRCH) { | |
694 cv->tid = -1; | |
695 } | |
696 | |
687 return NGX_ERROR; | 697 return NGX_ERROR; |
688 } | 698 } |
689 | 699 |
690 ngx_log_debug1(NGX_LOG_DEBUG_CORE, cv->log, 0, | 700 ngx_log_debug1(NGX_LOG_DEBUG_CORE, cv->log, 0, |
691 "cv " PTR_FMT " is signaled", cv); | 701 "cv " PTR_FMT " is signaled", cv); |