summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-11-15 03:07:42 +0000
committerpjd <pjd@FreeBSD.org>2010-11-15 03:07:42 +0000
commitec5f555493c65604767f243d015cee2b856c31b6 (patch)
tree59c1eaad4ecd9c4f2332216c117d2a0d1f8106d4 /sbin
parent781dd0dfd84b7c786467776fa290aea6faf572f7 (diff)
downloadFreeBSD-src-ec5f555493c65604767f243d015cee2b856c31b6.zip
FreeBSD-src-ec5f555493c65604767f243d015cee2b856c31b6.tar.gz
Move timeout.tv_sec initialization outside the loop - sigtimedwait(2) won't
modify it. Submitted by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
Diffstat (limited to 'sbin')
-rw-r--r--sbin/hastd/primary.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index cfc2508..0f9404b 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -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 */
OpenPOWER on IntegriCloud