Within mon-text, there is the comment that usleep is not very portable. I did run into a bug with this on an SGI. usleep for values greater than 1 second (values over 1000000) returns immediately. I replace the code usleep(value*1000000) with:

if (delay < 1){
   usleep(delay * 1000000);
}
else{
   int d2 = (int) delay;
   sleep(d2);
   double fraction = delay - d2;
   usleep(fraction * 1000000);
}


which works very well.

--Ron
__ distcc mailing list http://distcc.samba.org/ To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/distcc

Reply via email to