loop, to use signals properly. There are two copies of this code; one
uses kvm and the other uses sysctls. One copy had been updated to use
sigset_t and sigsuspend; the other was using vintage sigpause(). Sync
up the code so both use sigpause. Also, use sig_atomic_t, and block
SIGALRM when not waiting for it to avoid a small and unlikely but real
race.
Since the non-modernized copy of the code *had* for some been
modernized to use setitimer instead of just alarm(), propagate that
change to the other copy.
These copies could share more logic than they do.
The lengths of the lines being compared were not correct. Essentially, we
were comparing the length of the buffers instead of the length of the strings.
This patch also avoids calling skip() twice for the same line.
Thanks to Rin Okuyama for the patch.
if the lenghts are equal before calling strcmp(3). Most of the times, the call
to strcmp(3) can be saved if the lines are not of the same length.
Thanks to Christos for the reviews
Remove main() function prototype if present.
Mark usage() as __dead if not already.
Binaries generated with & without these patches were compared with diff -r.
well as *interrupted* targets to be deleted. The name and behavior of
the variable matches gmake.
Also fix a glitch in newline output on error in compat mode that I
discovered while doing it.
Closes PR 51376.
Generalise in stating that this version is not bug for bug compatible with other
implementations.
Bump date.
Via FreeBSD bug 181390 with feedback from Warren Block.
The filter is applied to paths Read or Excuted, and if it expands to
nothing, the entry is skipped.
For example; dirdeps.mk can set this to:
.MAKE.META.IGNORE_FILTER = M*/${.MAKE.DEPENDFILE_PREFIX}*
when checking if DIRDEPS_CACHE is up to date, where only Makefile.depend*
are of interest.