Index: filed.c ================================================================== --- filed.c +++ filed.c @@ -715,19 +715,22 @@ return; } static void *filed_sockettimeout_thread(void *arg) { + struct timespec sleep_time; time_t now, expiration_time; pthread_t thread_id; long idx; int count; bool valid; while (1) { for (count = 0; count < 10; count++) { - usleep(30000000); + sleep_time.tv_sec = 30; + sleep_time.tv_nsec = 0; + nanosleep(&sleep_time, NULL); now = time(NULL); atomic_store(&filed_sockettimeout_time, now); } @@ -1913,11 +1916,11 @@ } /* Wait for threads to exit */ /* XXX:TODO: Monitor thread usage */ while (1) { - sleep(60); + sleep(86400); } /* Return in failure */ return(2); }