Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 1997 20:04:18 +0000
From:      Brian Somers <brian@awfulhak.demon.co.uk>
To:        =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.ru>
Cc:        brian@freebsd.org, FreeBSD-current <current@freebsd.org>
Subject:   Re: ppp & signals pending 
Message-ID:  <199703112004.UAA06847@awfulhak.demon.co.uk>
In-Reply-To: Your message of "Tue, 11 Mar 1997 12:19:31 %2B0300." <Pine.BSF.3.95q.970311115705.561A-100000@nagual.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Brian, here some thoughts about signals pending in ppp and possible
> restoring your sig.c functionality:
> 
> All signals separated by following categories:
> 
> 1) Fatal signals which can't be pended (they was pended in old version
> which cause dead loop).

Everything that's trapped with a call to Hangup() is fatal, but I suspect
that HUP was causing the malloc() recursion.

> 2) SIGALRM can be pended with great care, there is too many functions
> (lqr, fsm, ...) which assume that they called via regular intervals (f.e. 
> "... send LQR every %d.%d secs"). Time difference between pended SIGALRM
> and not pended variant must be not greater then minimal accuracy expected. 
> This things are relatively hard to control and measure, that is why I
> prefer not pend SIGALRM at all and remove sig.c code instead of fixing it,
> but if you can show that needed accuracy is reached, you can restore
> pending of SIGALRM back.

Tricky.  As you say, it's difficult to test this stuff.  Trying to prove
it with statistics will be tricky too, AFAIK, the stdio libs won't
recurse too well and they call malloc() to boot.

Would you be interested if I sent you a copy of timer.c/main.c that
remembers when it's called and dumps statistics on exit ?

> 3) Other signals can be pended safely (including kill signals), but only
> for main loop, not for execv (they was pended for execv in old variant,
> also it looks like cosmetique thing with current implementation).

The stuff before exec doesn't really matter - I left it pending for
tidyness - it clears the caused bit/element and then calls signal().
I don't mind if this stuff stays out.

> -- 
> Andrey A. Chernov
> <ache@null.net>
> http://www.nagual.ru/~ache/
> 
> 

-- 
Brian <brian@awfulhak.demon.co.uk>, <brian@freebsd.org>
      <http://www.awfulhak.demon.co.uk/>;
Don't _EVER_ lose your sense of humour....





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703112004.UAA06847>