From b8fc89166dba79bdffbce2cf851b81029c7b6a4e Mon Sep 17 00:00:00 2001 From: Unbit Date: Sun, 10 Feb 2013 19:52:50 +0100 Subject: [PATCH] reset sigmask on startup --- core/uwsgi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/uwsgi.c b/core/uwsgi.c index e0bb811a..0386a360 100644 --- a/core/uwsgi.c +++ b/core/uwsgi.c @@ -1663,6 +1663,13 @@ int main(int argc, char *argv[], char *envp[]) { struct utsname uuts; + // signal mask is inherited, and sme process manager could make a real mess... + sigset_t smask; + sigfillset(&smask); + if (sigprocmask(SIG_UNBLOCK, &smask, NULL)) { + uwsgi_error("sigprocmask()"); + } + signal(SIGSEGV, uwsgi_segfault); signal(SIGFPE, uwsgi_fpe); signal(SIGHUP, SIG_IGN);