Otherwise they cause problems. Automake's generated `Makefile' calls
out to `config.status' to do something involving dependency tracking;
but that in turn calls back out to `make'. If the jobserver is active,
then the file-descriptor juggling done inside `config.status' can
clobber the jobserver pipe descriptors, which breaks things badly.
It appears that the file-descriptor assignments in `config.status' are
finely judged so that they will avoid the jobserver descriptors /if/ the
prevailing environment hasn't opened any descriptors beyond the standard
three. So we must keep our descriptors from leaking out and messing up
this delicate balance.
Of course, this is really a bug in Autoconf and/or Automake, but POSIX
shell doesn't have a way to allocate a descriptor dynamically, so I'm
going to cut them some slack here.
runx () {
notify 2 "+++ $*"
runx () {
notify 2 "+++ $*"
- "$@" 2>&3 || fail "$1: exit $?"
+ "$@" 2>&3 3>&- 4>&- 5>&- || fail "$1: exit $?"
}
run () { runx "$@" >&3; }
yesno () {
echo -n "(test $*)" >&4
}
run () { runx "$@" >&3; }
yesno () {
echo -n "(test $*)" >&4
+ if "$@" >&4 2>&4 3>&- 4>&- 5>&-; then
echo "(yes)" >&4
echo yes
else
echo "(yes)" >&4
echo yes
else