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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user