summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-08-27 20:49:06 +0000
committerpjd <pjd@FreeBSD.org>2010-08-27 20:49:06 +0000
commite55034b62260e3f8056f2f79cbe0b70e3f8ac9c9 (patch)
tree7ceab3886a367aa12aeebc70404fc4089f4c7e29 /sbin
parentbd949b7dfc6795cba33cdec12513fda317bc6a16 (diff)
downloadFreeBSD-src-e55034b62260e3f8056f2f79cbe0b70e3f8ac9c9.zip
FreeBSD-src-e55034b62260e3f8056f2f79cbe0b70e3f8ac9c9.tar.gz
Check if no signals were delivered just before going to sleep.
MFC after: 2 weeks Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
Diffstat (limited to 'sbin')
-rw-r--r--sbin/hastd/primary.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index 0b02065..2d8a0e4 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -1988,7 +1988,9 @@ guard_thread(void *arg)
rw_unlock(&hio_remote_lock[ii]);
}
}
- (void)cv_timedwait(&hio_guard_cond, &hio_guard_lock, timeout);
+ /* Sleep only if a signal wasn't delivered in the meantime. */
+ if (!sigexit_received && !sighup_received && !sigchld_received)
+ cv_timedwait(&hio_guard_cond, &hio_guard_lock, timeout);
mtx_unlock(&hio_guard_lock);
}
/* NOTREACHED */
OpenPOWER on IntegriCloud