diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2013-06-05 19:44:20 +0400 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2013-06-05 19:44:20 +0400 |
commit | 6b95320cf70baa57650e9f282592569912dc36ca (patch) | |
tree | 8fda18323506c6f86e0618cd94057d286593d2a6 /src/os/unix/ngx_process.c | |
parent | f6650479c30d26b82187bfe0a343a4c92eb9a81a (diff) | |
download | nginx-6b95320cf70baa57650e9f282592569912dc36ca.tar.gz nginx-6b95320cf70baa57650e9f282592569912dc36ca.zip |
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().
Diffstat (limited to 'src/os/unix/ngx_process.c')
-rw-r--r-- | src/os/unix/ngx_process.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c index 4ef3582e8..6f3f38556 100644 --- a/src/os/unix/ngx_process.c +++ b/src/os/unix/ngx_process.c @@ -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 } } |