1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

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
This commit is contained in:
Pawel Jakub Dawidek 2010-11-15 03:07:42 +00:00
parent 1dd5a4bfa2
commit d448536ceb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=215332

View File

@ -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 */