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.
This commit is contained in:
Martin Willi
2014-02-06 15:57:36 +01:00
parent 0edd13b6c8
commit 1df1430146
+1
View File
@@ -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);