[distcc] Remote distccd version-check

Wayne Davison wayned at users.sourceforge.net
Wed Mar 19 19:40:52 GMT 2003

I was wanting to make my distcc_probe script interact with the distccd
daemons in a nicer fashion (other than just closing the socket after
connecting), so I thought it would be good to add a version query to the
protocol.  The idea is that the client connects to the remote distccd,
sends "QVER00000000" (the padding seems to be necessary), and distccd
responds with its version string and (the child process) exits.

While implementing this I noticed a bug in the dcc_r_request_header()
function when it checks if the token is DIST or not -- the return
value of dcc_r_token_int() is never -1, so that part of the function
never returns a failure (the version check part of the function usually
fails instead).

Here's a patch that fixes the above bug and implements the QVER protocol


My latest distcc_probe script is here:


After adding systems to the ~/.distcc_hosts file, you can use the script
like this:

    eval `distcc_probe -v`

And this will cause PATH, DISTCC_HOSTS, and MAKEOPTS to be tweaked.  The
last var is a gentoo-ism -- you may want to set MAKEFLAGS instead, or
get in the habit of using "make $MAKEOPTS" in those cases where you want
to use parallel compilation.


More information about the distcc mailing list