Silently recover if REDO_CHEATFDS file descriptors are closed, because they aren't completely essential and MAKEFLAGS-related warnings already get printed if all file descriptors have been closed. If MAKEFLAGS --jobserver-auth flags are closed, improve the error message so that a) it's a normal error instead of an exception and b) we link to documentation about why it happens. Also write some more detailed documentation about what's going on here.
16 lines
761 B
Text
16 lines
761 B
Text
# Make sure we can survive if a process closes all file descriptors,
|
|
# including any jobserver file descriptors, as long as they also
|
|
# unset MAKEFLAGS.
|
|
redo-ifchange ../../redo/py
|
|
|
|
# If we leave MAKEFLAGS set, then it's fair game to complain that the
|
|
# advertised file descriptors are gone, because GNU make also complains.
|
|
# (Although they only warn while we abort. They can't abort so that
|
|
# they don't break backward compat, but we have no such constraint, because
|
|
# redo has always failed for that case.)
|
|
#
|
|
# On the other hand, we shouldn't have to unset REDO_CHEATFDS, both for
|
|
# backward compatibility, and because REDO_CHEATFDS is undocumented.
|
|
# redo should recover silently from that problem.
|
|
unset MAKEFLAGS
|
|
../../redo/py ./closefds.py redo noflags
|