From owner-freebsd-current Tue Mar 11 06:36:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id GAA06548 for current-outgoing; Tue, 11 Mar 1997 06:36:04 -0800 (PST) Received: from sovcom.kiae.su (sovcom.kiae.su [193.125.152.1]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id GAA06502 for ; Tue, 11 Mar 1997 06:36:00 -0800 (PST) Received: by sovcom.kiae.su id AA20211 (5.65.kiae-1 ); Tue, 11 Mar 1997 17:05:13 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Tue, 11 Mar 97 17:05:12 +0300 Received: (from ache@localhost) by nagual.ru (8.8.5/8.8.5) id QAA00531; Tue, 11 Mar 1997 16:47:08 +0300 (MSK) Date: Tue, 11 Mar 1997 16:47:02 +0300 (MSK) From: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= To: Bruce Evans Cc: brian@awfulhak.demon.co.uk, brian@utell.co.uk, current@freebsd.org Subject: Re: ppp In-Reply-To: <199703111050.VAA09291@godzilla.zeta.org.au> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 11 Mar 1997, Bruce Evans wrote: > >This way you lost _number_ of signals which may come. Since all signals > >mapped to single bit in "caused" bitmask, here can be f.e. 10 or more > >similar signals, but only one time signal handler will be executed. You > >need to replace "caused" bitmask with "int caused[__MAXSIG];" and count > >true number of signals come: caused[sig]++ (decrease it when handler was > >executed: caused[sig]--). > > Generally you don't care and can't tell exactly how many signals occurred > (the system doesn't count them). One exception might be if SIGALRM is > pended and there is too large a latrency before unpending. Then counting > could be used to tell how many SIGALRMs were mishandled :-). Why system? The handler count them. I.e. LQR package must be sent each 1.2 seconds. When you delay handler, you can lost signal during delayed handler processing, as result you will sent less packets then needed. With signal counting you only increase time interval, but sent exact number of packets. -- Andrey A. Chernov http://www.nagual.ru/~ache/