From: Martin Willi Date: Tue, 4 Feb 2014 10:14:27 +0000 (+0100) Subject: charon-cmd: Block SIGUSR1 on worker threads X-Git-Tag: 5.1.2rc1~27^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1df1430146ac80db8966a57254b70c32b0b85f3f;p=thirdparty%2Fstrongswan.git charon-cmd: Block SIGUSR1 on worker threads To properly shut down charon-cmd with leak reports, only the main thread should catch SIGUSR1 to shut down the application. Work threads should ignore SIGUSR1 to avoid any hard application termination. --- diff --git a/src/charon-cmd/charon-cmd.c b/src/charon-cmd/charon-cmd.c index 5f4787b587..0c24fd1467 100644 --- a/src/charon-cmd/charon-cmd.c +++ b/src/charon-cmd/charon-cmd.c @@ -389,6 +389,7 @@ int main(int argc, char *argv[]) sigaddset(&action.sa_mask, SIGINT); sigaddset(&action.sa_mask, SIGTERM); sigaddset(&action.sa_mask, SIGHUP); + sigaddset(&action.sa_mask, SIGUSR1); sigaction(SIGSEGV, &action, NULL); sigaction(SIGILL, &action, NULL); sigaction(SIGBUS, &action, NULL);