Mercurial > hg > nginx-quic
diff src/os/unix/ngx_process.c @ 3587:e1409e56ba7c stable-0.7
merge r3473, r3474, r3385, r3386, r3537:
signal processing stability:
*) use sys_errlist[] in signal handler instead
of non Async-Signal-Safe strerror_r()
*) do not update time in the timer signal handler,
since localtime_r() is not Async-Signal-Safe function
*) use previously cached GMT offset value to update time from a signal handler
*) change ngx_time_update() interface since there are no notification methods
those return time
*) introduce ngx_time_sigsafe_update() to update the error log time only
*) change ngx_time_update() interface
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 07 Jun 2010 10:35:08 +0000 |
parents | 1f3cd08ebb82 |
children |
line wrap: on
line diff
--- a/src/os/unix/ngx_process.c +++ b/src/os/unix/ngx_process.c @@ -315,7 +315,7 @@ ngx_signal_handler(int signo) } } - ngx_time_update(0, 0); + ngx_time_sigsafe_update(); action = ""; @@ -476,16 +476,17 @@ ngx_process_get_status(void) */ if (err == NGX_ECHILD) { - ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, errno, - "waitpid() failed"); + ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0, + "waitpid() failed (%d: %s)", + err, ngx_sigsafe_strerror(err)); return; } #endif - ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, errno, - "waitpid() failed"); - + ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, + "waitpid() failed (%d: %s)", + err, ngx_sigsafe_strerror(err)); return; }