Date: Sat, 20 Jul 1996 23:48:22 +0000 (GMT) From: Adam David <adam@veda.is> To: freebsd-current@freebsd.org Subject: missed SIGALRM Message-ID: <199607202348.XAA06918@veda.is>
next in thread | raw e-mail | index | archive | help
I have noticed that a SIGALRM can sometimes be missed altogether under certain
conditions, perhaps as a side-effect of heavy machine load. I am looking into
this problem, and any other datapoints/suggestions are welcome. The following
program (in its more complete version) stops doing its stuff once in a while
(typically once a day or more often) and needs to be restarted as a result.
The likelihood of this occuring seems related to periods of heavy system load.
int tick;
handler() { tick = 1; }
set_tick() {
tick = 0;
signal(SIGALRM, handler);
alarm(1);
}
get_tick() { return tick; }
main() {
set_tick();
for (;;) {
if (get_tick()) {
/* do stuff */
set_tick();
}
}
}
--
Adam David <adam@veda.is>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607202348.XAA06918>
