comparison src/os/unix/ngx_process.c @ 4889:a50ed82f19e4

Removed conditional compilation from waitpid() error test. There are reports that call to a signal handler for an exited process despite waitpid() already called for the process may happen on Linux as well.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 18 Oct 2012 14:48:33 +0000
parents 14411ee4d89f
children 593d344999f5
comparison
equal deleted inserted replaced
4888:3abac956f6c8 4889:a50ed82f19e4
472 472
473 if (err == NGX_ECHILD && one) { 473 if (err == NGX_ECHILD && one) {
474 return; 474 return;
475 } 475 }
476 476
477 #if (NGX_SOLARIS || NGX_FREEBSD)
478
479 /* 477 /*
480 * Solaris always calls the signal handler for each exited process 478 * Solaris always calls the signal handler for each exited process
481 * despite waitpid() may be already called for this process. 479 * despite waitpid() may be already called for this process.
482 * 480 *
483 * When several processes exit at the same time FreeBSD may 481 * When several processes exit at the same time FreeBSD may
488 if (err == NGX_ECHILD) { 486 if (err == NGX_ECHILD) {
489 ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, err, 487 ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, err,
490 "waitpid() failed"); 488 "waitpid() failed");
491 return; 489 return;
492 } 490 }
493
494 #endif
495 491
496 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, err, 492 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, err,
497 "waitpid() failed"); 493 "waitpid() failed");
498 return; 494 return;
499 } 495 }