svn commit: r211896 - head/sbin/hastd
Pawel Jakub Dawidek
pjd at FreeBSD.org
Fri Aug 27 20:49:06 UTC 2010
Author: pjd
Date: Fri Aug 27 20:49:06 2010
New Revision: 211896
URL: http://svn.freebsd.org/changeset/base/211896
Log:
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
Modified:
head/sbin/hastd/primary.c
Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c Fri Aug 27 20:48:12 2010 (r211895)
+++ head/sbin/hastd/primary.c Fri Aug 27 20:49:06 2010 (r211896)
@@ -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 */
More information about the svn-src-head
mailing list