From owner-freebsd-current Sat Jul 20 16:48:43 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA24778 for current-outgoing; Sat, 20 Jul 1996 16:48:43 -0700 (PDT) Received: from veda.is (root@ubiq.veda.is [193.4.230.60]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id QAA24771 for ; Sat, 20 Jul 1996 16:48:39 -0700 (PDT) Received: (from adam@localhost) by veda.is (8.7.5/8.7.3) id XAA06918 for freebsd-current@freebsd.org; Sat, 20 Jul 1996 23:48:24 GMT From: Adam David Message-Id: <199607202348.XAA06918@veda.is> Subject: missed SIGALRM To: freebsd-current@freebsd.org Date: Sat, 20 Jul 1996 23:48:22 +0000 (GMT) X-Mailer: ELM [version 2.4ME+ PL22 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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