]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp
New signal handling infrastructure. Prevent unloading running module.
[stg.git] / projects / stargazer / plugins / authorization / inetaccess / inetaccess.cpp
index 4986080eb82a1b4c212e3a2a7b6bbef069bf6320..1eac0ab1f7fc462bfe72556aec021aaecff17593 100644 (file)
@@ -500,6 +500,10 @@ return 0;
 //-----------------------------------------------------------------------------
 void * AUTH_IA::Run(void * d)
 {
 //-----------------------------------------------------------------------------
 void * AUTH_IA::Run(void * d)
 {
+sigset_t signalSet;
+sigfillset(&signalSet);
+pthread_sigmask(SIG_BLOCK, &signalSet, NULL);
+
 AUTH_IA * ia = static_cast<AUTH_IA *>(d);
 
 ia->isRunningRun = true;
 AUTH_IA * ia = static_cast<AUTH_IA *>(d);
 
 ia->isRunningRun = true;
@@ -525,6 +529,10 @@ return NULL;
 //-----------------------------------------------------------------------------
 void * AUTH_IA::RunTimeouter(void * d)
 {
 //-----------------------------------------------------------------------------
 void * AUTH_IA::RunTimeouter(void * d)
 {
+sigset_t signalSet;
+sigfillset(&signalSet);
+pthread_sigmask(SIG_BLOCK, &signalSet, NULL);
+
 AUTH_IA * ia = static_cast<AUTH_IA *>(d);
 
 ia->isRunningRunTimeouter = true;
 AUTH_IA * ia = static_cast<AUTH_IA *>(d);
 
 ia->isRunningRunTimeouter = true;