distcc uses a simple, application-specific protocol running directly over a TCP socket. A new request socket is opened for each job.
The request and response begin with a magic number and version number, allowing incompatible versions or misconfigurations to be identified. At the moment there is only one deployed protocol version, and no attempt to support backward or forward compatibility, though this could be added in the future.
The request and response consist of tagged, length-preceded elements. Each element of the request contains a four-character ASCII token, an eight-digit ASCII hexadecimal length or value, and, depending on the tag, a byte stream whose length is determined by the hexadecimal field.
The complete request is sent to the server before the reply begins. Opening the TCP socket is performed concurrently with execution of the preprocessor on the client.
The request from the client contains
The response from the server contains
Consult the source for more information.
distcc stores working files in a subdirectory of
/tmp. These include synchronization files, and
compiler input/output temporary files.
Temporary files should normally be cleaned up when the program exits. If distcc misbehaves, these files may be useful in tracking down the cause. Any that remain can be removed by the system's temporary file reaper, or by hand.
distcc uses lock files to allow each client to balance its
jobs across available volunteer machines. For each
volunteer host, a zero-length file is created. Clients
using that volunteer hold a
flock lock on the file