mirror of
https://github.com/nginx/nginx.git
synced 2026-06-27 04:12:05 +00:00
Valgrind: sigaction() failure now ignored.
Valgrind intercepts SIGUSR2 in some cases, and nginx might not be able to start due to sigaction() failure. If compiled with NGX_VALGRIND defined, we now ignore the failure of sigaction().
This commit is contained in:
parent
f6650479c3
commit
6b95320cf7
1 changed files with 5 additions and 0 deletions
|
|
@ -291,9 +291,14 @@ ngx_init_signals(ngx_log_t *log)
|
|||
sa.sa_handler = sig->handler;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
if (sigaction(sig->signo, &sa, NULL) == -1) {
|
||||
#if (NGX_VALGRIND)
|
||||
ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
|
||||
"sigaction(%s) failed, ignored", sig->signame);
|
||||
#else
|
||||
ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
|
||||
"sigaction(%s) failed", sig->signame);
|
||||
return NGX_ERROR;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue