git: bmake - Always pass the jobs pipe descriptor
dillon at crater.dragonflybsd.org
Sat Apr 5 12:57:21 PDT 2014
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sat Apr 5 12:48:59 2014 -0700
bmake - Always pass the jobs pipe descriptor
* bmake currently requires a .MAKE target dependency to induce the passing
of the jobs pipe descriptor to sub-jobs (aka sub-makes). This requirement
was lost due to a bug in bmake where it's F_SETFD fcntl was being run on
the wrong descriptor. This was recently fixed in bmake and exposed this
* bmake might be run with the MAKEFLAGS environment intact but not be passed
the jobs descriptor. While bmake creates a new fresh jobs descriptor in
this case, it would remain an issue if some other parent program happened
to use a pipe descriptor with the same fd number.
* bmake or intermediate build programs might not be run with a .MAKE target
dependency, causing sub-bmakes to run an excessive number of concurrent
* The question is whether we can really safely require this new behavior
or whether we should revert to the prior behavior.
FreeBSD modified the default to be the prior behavior of always passing
the jobs pipe descriptor and added a new .MAKE* directive to override it,
but I don't see how this helps matters when the default really needs to be
the always-pass behavior anyway.
The only other solution is to use a filesystem-visible pipe (filesystem fifo
in /tmp), which the old make used. But this often results in a lot of cruft
building up in /tmp from ^C's and/or system crashes. This solution is the
most compatible with expectations, frankly.
* For now revert to the prior behavior of always passing the jobs pipe
descriptor. This does a better job of guarenteeing that the descriptor
number remains intact through multiple fork/execs.
Summary of changes:
contrib/bmake/job.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
DragonFly BSD source repository
More information about the Commits