comparison src/os/unix/ngx_process.c @ 635:e67b227c8dbb default tip

Merge with current.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 25 Apr 2011 04:07:55 +0400
parents 428c6e58046a
children
comparison
equal deleted inserted replaced
578:f3a9e57d2e17 635:e67b227c8dbb
9 #include <ngx_event.h> 9 #include <ngx_event.h>
10 #include <ngx_channel.h> 10 #include <ngx_channel.h>
11 11
12 12
13 typedef struct { 13 typedef struct {
14 int signo; 14 int signo;
15 char *signame; 15 char *signame;
16 char *name; 16 char *name;
17 void (*handler)(int signo); 17 void (*handler)(int signo);
18 } ngx_signal_t; 18 } ngx_signal_t;
19 19
20 20
21 21
22 static void ngx_execute_proc(ngx_cycle_t *cycle, void *data); 22 static void ngx_execute_proc(ngx_cycle_t *cycle, void *data);
315 if (sig->signo == signo) { 315 if (sig->signo == signo) {
316 break; 316 break;
317 } 317 }
318 } 318 }
319 319
320 ngx_time_update(0, 0); 320 ngx_time_sigsafe_update();
321 321
322 action = ""; 322 action = "";
323 323
324 switch (ngx_process) { 324 switch (ngx_process) {
325 325
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, err,
483 "waitpid() failed"); 483 "waitpid() failed");
484 return; 484 return;
485 } 485 }
486 486
487 #endif 487 #endif
488 488
489 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, errno, 489 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, err,
490 "waitpid() failed"); 490 "waitpid() failed");
491
492 return; 491 return;
493 } 492 }
494 493
495 494
496 if (ngx_accept_mutex_ptr) { 495 if (ngx_accept_mutex_ptr) {