[nginx] Valgrind: sigaction() failure now ignored.

Maxim Dounin mdounin at mdounin.ru
Wed Jun 5 16:10:03 UTC 2013

details:   http://hg.nginx.org/nginx/rev/593d344999f5
changeset: 5244:593d344999f5
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Wed Jun 05 19:44:20 2013 +0400
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().


 src/os/unix/ngx_process.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (18 lines):

diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
--- 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;
         if (sigaction(sig->signo, &sa, NULL) == -1) {
+            ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
+                          "sigaction(%s) failed, ignored", sig->signame);
             ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
                           "sigaction(%s) failed", sig->signame);
             return NGX_ERROR;

More information about the nginx-devel mailing list