comparison src/os/unix/ngx_process.c @ 3472:65481698535c

use sys_errlist[] in signal handler instead of non Async-Signal-Safe strerror_r()
author Igor Sysoev <igor@sysoev.ru>
date Fri, 12 Mar 2010 11:15:26 +0000
parents f94e8ff65aa2
children d4c4cfdffe30
comparison
equal deleted inserted replaced
3471:d8c56e7851b8 3472:65481698535c
477 * erroneously call the signal handler for exited process 477 * erroneously call the signal handler for exited process
478 * despite waitpid() may be already called for this process. 478 * despite waitpid() may be already called for this process.
479 */ 479 */
480 480
481 if (err == NGX_ECHILD) { 481 if (err == NGX_ECHILD) {
482 ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, errno, 482 ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0,
483 "waitpid() failed"); 483 "waitpid() failed (%d: %s)",
484 err, ngx_sigsafe_strerror(err));
484 return; 485 return;
485 } 486 }
486 487
487 #endif 488 #endif
488 489
489 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, errno, 490 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0,
490 "waitpid() failed"); 491 "waitpid() failed (%d: %s)",
491 492 err, ngx_sigsafe_strerror(err));
492 return; 493 return;
493 } 494 }
494 495
495 496
496 if (ngx_accept_mutex_ptr) { 497 if (ngx_accept_mutex_ptr) {