From 59fb7e543f8ae1b32321a7af9501d5fc3032004e Mon Sep 17 00:00:00 2001 From: Brian Feldman Date: Tue, 20 Apr 2004 22:04:12 +0000 Subject: [PATCH] Treat kevent(2) returning an error EINTR as the non-error it is. --- usr.bin/make/job.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index 59f3ec9bf23b..4f43e7f7658f 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -1263,7 +1263,7 @@ JobExec(Job *job, char **argv) NOTE_EXIT, 0, NULL); if (kevent(kqfd, kev, 2, NULL, 0, NULL) != 0) { /* kevent() will fail if the job is already finished */ - if (errno != EBADF && errno != ESRCH) + if (errno != EINTR && errno != EBADF && errno != ESRCH) Punt("kevent: %s", strerror(errno)); } #else @@ -2250,7 +2250,8 @@ Job_CatchOutput(void) if (usePipes) { #ifdef USE_KQUEUE if ((nfds = kevent(kqfd, NULL, 0, kev, KEV_SIZE, NULL)) == -1) { - Punt("kevent: %s", strerror(errno)); + if (errno != EINTR) + Punt("kevent: %s", strerror(errno)); } else { for (i = 0; i < nfds; i++) { if (kev[i].flags & EV_ERROR) {