summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2020-01-29 17:06:52 +0000
committerMarc Espie <espie@cvs.openbsd.org>2020-01-29 17:06:52 +0000
commitabcc11ee107d76794b0ac58c53ed831df3cabe61 (patch)
tree4da5a5ec2e48fe2410814cdba1a7838aac2cb01e /usr.bin/make
parentce888fa07f9a2439a4993b854787b375a9920d10 (diff)
in the very strange case where make's child gets ptrace'd by its own infant
(hi mpi@) we may wish to ignore WIFSTOPPED so that other bugs elsewhere may get found. Also give more information in "can't happen" case to speed up figuring problems out. okay millert@, mpi@
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/job.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index ba71b154a68..329ff3037c2 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: job.c,v 1.159 2020/01/16 16:07:18 espie Exp $ */
+/* $OpenBSD: job.c,v 1.160 2020/01/29 17:06:51 espie Exp $ */
/* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */
/*
@@ -757,11 +757,14 @@ reap_jobs(void)
Job *job;
while ((pid = waitpid(WAIT_ANY, &status, WNOHANG)) > 0) {
+ if (WIFSTOPPED(status))
+ continue;
reaped = true;
job = reap_finished_job(pid);
if (job == NULL) {
- Punt("Child (%ld) not in table?", (long)pid);
+ Punt("Child (%ld) with status %d not in table?",
+ (long)pid, status);
} else {
handle_job_status(job, status);
determine_job_next_step(job);