[distcc] Getting distcc errors to the user

Wayne Davison wayned at users.sourceforge.net
Fri Apr 4 04:55:26 GMT 2003

It was noted earlier that some distcc errors can get cached by ccache in
its stderr cache file that should really not be saved (e.g. if a host is
down and a command was run locally).  I was wondering if distcc should
attempt to open up /dev/tty as the destination for these transient
errors?  (If that fails, it could fall-back to using stderr.)

Another possibility (that Martin mentioned) is to have ccache somehow
make the original stderr file-handle available to the "compiler" that it
runs (distcc, in this case).  Martin: how were you imagining this
working?  Would ccache set an environment variable to let distcc know
about the alternate stderr variable (i.e. "REAL_STDERR_FD=3")?

The choice is interesting.  Opening /dev/tty has the advantage that it
works without changing other programs (ccache or whatever else may come
along).  It also avoids putting the transient errors into some
redirected output file where the user might not see them (e.g., if I run
"gcc ...  2>errors", it would be nice if the "errors" file didn't
contain the distcc warnings).  On the other hand, there might be times
that this idiom would cause problems.  There would probably also need to
be some compatibility code that did the same thing on non-Unix systems.

Thoughts?  I'm liking the /dev/tty idea.


More information about the distcc mailing list