From 8379360aeba6a671687dcb3fceed043f8f1cb588 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Wed, 2 Nov 2016 08:12:37 +0000 Subject: [PATCH] Make autounmountd(8) not die when traced with "truss -p". MFC after: 1 month --- usr.sbin/autofs/autounmountd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/autofs/autounmountd.c b/usr.sbin/autofs/autounmountd.c index 3a13225aa80a..f65e78a81067 100644 --- a/usr.sbin/autofs/autounmountd.c +++ b/usr.sbin/autofs/autounmountd.c @@ -244,8 +244,11 @@ do_wait(int kq, double sleep_time) log_debugx("waiting for filesystem event"); nevents = kevent(kq, NULL, 0, &unused, 1, NULL); } - if (nevents < 0) + if (nevents < 0) { + if (errno == EINTR) + return; log_err(1, "kevent"); + } if (nevents == 0) { log_debugx("timeout reached");