executed the make job with sigprocmask(SIG_BLOCK) in effect for a
number of signals including SIGCHLD. This caused recursive submakes
of the make process in question not to receive SIGCHLDs when their
jobs exited. This was a second, independent cause of bin/18895 in
addition to the race condition already fixed. Fixed by unblocking all
signals before executing the job.
search list that will be used. Thus 'dot' and 'cur' will appear in
${.PATH} either at the start or end depending on .DOTLAST even though
they are not strictly in dirSearchPath.
When .CURDIR is assigned to - re-set the 'cur' Path.
Finally, when checking subdirs, look in 'dot' and 'cur' (first or last
depending on .DOTLAST) just as we do in other situations.
seconds if a SIGCHLD arrived while make was not blocked in poll(),
by making the SIGCHLD handler write to a pipe included in the poll.
Avoided the need to implement a duplicate fix for the USE_SELECT case
by emulating poll() in terms of select() when USE_SELECT is defined.
Fixes bin/18895.
- consistently support __hpux (which the HP compilers define) as well
as __hpux__ (not sure which compilers set this, but retained anyway)
- fix a typo in the definition of signal(). arguably the codebase should
just be converted to sigaction()...
In these revisions `::' dependency handling was simplified by not linking
the cohort nodes into the dependency graph. This broke dependency checking
on all but the first instance of a `::' target since all of the cohort nodes
now just form a collection of disconnected dependency graphs.
Fix this by keeping a back-reference in each cohort to its leader (the
first instance of a :: node with the same name) and a count of the number
of cohorts that need to be made before dependent nodes are scheduled.
Classically, we'd need six centurions for cohort, but in this case one
suffices...
while setting up a child process. This prevents the major sources of
list inconsistencies that may result from doing list manipulations
from a signal handler.
XXX - all Lst_*() operations are at risk; look for ways to avoid touching
so much global state from the signal handlers.
- don't block the signal we're about to send to ourselves to
take the default action for
- restore the signal handler for the current signal
- remove duplicate sigprocmask() call
As a result, restoring the SIGTSTP handler in JobContinueSig() is no longer
necessary.
1. Compensate for h-pox assert brain damage where it gets confused by the
string in: assert(!memcmp(foo, "in", 2)); I miss the h-pox broken compiler,
I had not had to work around it for years.
2. Oh, finally h-pox has random() and utimes(). We don't need our own anymore.
the removal of .USE nodes from a node's children list in case a given .USE
nodes appears multiple times on that list, preventing the target from ever
making it on the `to be made' queue.
Since the suffix rule processing code deals itself with removing the
transformation nodes from the parents to which it applies them, arrange
for doing the same for .USE nodes in MakeHandleUse() instead of in
Make_HandleUse(), and still use the OP_MARK stuff to avoid duplication
of commands.
Also, since Make_HandleUse() is not a list callback function and its
return value is no longer used, make its return type void.