svn commit: r215332 - head/sbin/hastd
Pawel Jakub Dawidek
pjd at FreeBSD.org
Mon Nov 15 03:07:42 UTC 2010
Author: pjd
Date: Mon Nov 15 03:07:42 2010
New Revision: 215332
URL: http://svn.freebsd.org/changeset/base/215332
Log:
Move timeout.tv_sec initialization outside the loop - sigtimedwait(2) won't
modify it.
Submitted by: Mikolaj Golub <to.my.trociny at gmail.com>
MFC after: 3 days
Modified:
head/sbin/hastd/primary.c
Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c Mon Nov 15 03:05:33 2010 (r215331)
+++ head/sbin/hastd/primary.c Mon Nov 15 03:07:42 2010 (r215332)
@@ -2010,6 +2010,7 @@ guard_thread(void *arg)
PJDLOG_VERIFY(sigaddset(&mask, SIGINT) == 0);
PJDLOG_VERIFY(sigaddset(&mask, SIGTERM) == 0);
+ timeout.tv_sec = RETRY_SLEEP;
timeout.tv_nsec = 0;
signo = -1;
@@ -2035,7 +2036,6 @@ guard_thread(void *arg)
guard_one(res, ii);
lastcheck = now;
}
- timeout.tv_sec = RETRY_SLEEP;
signo = sigtimedwait(&mask, NULL, &timeout);
}
/* NOTREACHED */
More information about the svn-src-head
mailing list