-
- //after 5 seconds waiting thread still running. now killing it
- if (isRunningRunTimeouter)
- {
- if (pthread_kill(timeouterThread, SIGINT))
- {
- errorStr = "Cannot kill thread.";
- return -1;
- }
- for (int i = 0; i < 25 && isRunningRunTimeouter; ++i)
- {
- struct timespec ts = {0, 200000000};
- nanosleep(&ts, NULL);
- }
- if (isRunningRunTimeouter)
- {
- printfd(__FILE__, "Failed to stop timeouter thread\n");
- }
- else
- {
- pthread_join(timeouterThread, NULL);
- }
- printfd(__FILE__, "AUTH_IA killed Timeouter\n");
- }