[distcc] lsdistcc, take 2: tuned and dangerous

Dan Kegel dank at kegel.com
Sun Oct 16 06:26:33 GMT 2005

In testing the lsdistcc program I posted earlier,
it was found that it did not tolerate certain
fairly common error-ish conditions.  A few
days of feverish hacking and testing later, here's the fix:
It uses an underhanded but fairly standard trick:
glibc uses a five second timeout on DNS lookups,
but we want lsdistcc to complete in under a second,
so if any DNS lookup takes longer than 500ms, we
start another lookup for the same host in a different
thread.  (Well, a different process; since this is distcc,
we need to be very portable here, and forking is available
on more systems than pthreads are.)

lsdistcc should be suitable for use in large and small distcc farms,
and lets you quickly query DNS for the list of actively listening distcc
- Dan

Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

More information about the distcc mailing list