Date: Fri, 11 Jun 2004 01:37:41 -0700 From: Sean McNeil <sean@mcneil.com> To: Daniel Eischen <eischen@vigrid.com> Cc: freebsd-threads@freebsd.org Subject: Re: signal handler priority issue Message-ID: <1086943061.10026.45.camel@server.mcneil.com> In-Reply-To: <Pine.GSO.4.10.10406110432370.12394-100000@pcnet5.pcnet.com> References: <Pine.GSO.4.10.10406110432370.12394-100000@pcnet5.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2004-06-11 at 01:34, Daniel Eischen wrote: > On Fri, 11 Jun 2004, Sean McNeil wrote: > > > > > > No, the problem is because SIGUSR2 is _not_ blocked. I read > > > "masked off" as "blocked" (the desired behavior). If the > > > signal handler runs, that means that the signal is not blocked. > > > Your goal is to prevent the signal handler (for SIGUSR2) from > > > running until sigsuspend() is hit. Once sigsuspend() is hit, > > > then SIGUSR2 becomes unblocked, the signal handler is run, > > > and sigsuspend() returns. > > > > This is exactly what boehm-gc is doing. There must be something else > > lurking in here that I've missed. I have to keep looking at it. > > Put print statements just before the sigsuspend() as well as > keeping it in the signal handler for SIGUSR2. If you see > the print from SIGUSR2 handler before you see the one from > just before sigsuspend(), you know that the signal mask > is not correct when SIGUSR1 is handled. > > Signing off for tonight... I think I may have it. I think the sigsuspend is releasing before the signal handler is executed so that the SIGUSR1 handler just loops and waits for the signal again. There may also be an optimization problem with the loop test not being volatile. Checking both posibilities now. Thanks for all the help.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1086943061.10026.45.camel>