X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/06938e336ea07128682fe074740a8f930c503caf..597f6f31e3801612273886481381df509d8bcd12:/projects/stargazer/plugins/other/radius/radius.cpp diff --git a/projects/stargazer/plugins/other/radius/radius.cpp b/projects/stargazer/plugins/other/radius/radius.cpp index 62c9305c..c827330f 100644 --- a/projects/stargazer/plugins/other/radius/radius.cpp +++ b/projects/stargazer/plugins/other/radius/radius.cpp @@ -236,7 +236,8 @@ if (isRunning) //5 seconds to thread stops itself for (int i = 0; i < 25 && isRunning; i++) { - usleep(200000); + struct timespec ts = {0, 200000000}; + nanosleep(&ts, NULL); } //after 5 seconds waiting thread still running. now killing it @@ -257,6 +258,10 @@ return 0; //----------------------------------------------------------------------------- void * RADIUS::Run(void * d) { +sigset_t signalSet; +sigfillset(&signalSet); +pthread_sigmask(SIG_BLOCK, &signalSet, NULL); + RADIUS * rad = (RADIUS *)d; RAD_PACKET packet;