Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
June 05, 2013 12:12PM
details: http://hg.nginx.org/nginx/rev/593d344999f5
branches:
changeset: 5244:593d344999f5
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Jun 05 19:44:20 2013 +0400
description:
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:

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;
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
}
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

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

Maxim Dounin 950 June 05, 2013 12:12PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 179
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready