maint.mk: less syntax-check noise when SIGPIPE is ignored
For a project with enough files, such as libvirt, vc-list-files
can produce so much input that it can lead to SIGPIPE to earlier
parts of a pipeline when later parts do a quick filter. Also,
many buildbot environments (annoyingly) ignore SIGPIPE, which
causes a number of tools to be rather chatty about reporting
EPIPE write failures. It doesn't help that POSIX has standardized
that the shell is unable to revert SIGPIPE to unignored status
if it inherits it as ignored - otherwise, the solution would just
be to re-enable SIGPIPE anywhere we expect to benefit from early
filtering exits. Here's a short demonstration:
and a link to the much larger buildbot results against libvirt:
http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/2465/console
with noise such as this, detracting from the later actual build
failure it was reporting:
But look at the above example: we are piping data to grep -l,
and then discarding that output. At most, data | grep -l will
output "(standard input)", and exit early if the first match
is found before the end of a page (causing SIGPIPE to the process
feeding the pipe). It makes much more sense to use grep -l when
searching for a subset of files that have a match among a larger
set of file names passed as arguments, and NOT when used to
filter stdin. Sure, we're burning a bit more CPU power by
processing the full list instead of exiting early, but at least
it cuts down on the noise.
* top/maint.mk (_sc_header_without_use)
(sc_require_config_h_first): Parse full list.