From owner-freebsd-threads@FreeBSD.ORG Fri Jun 11 08:34:56 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E510E16A4CE; Fri, 11 Jun 2004 08:34:56 +0000 (GMT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id A60C343D45; Fri, 11 Jun 2004 08:34:56 +0000 (GMT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i5B8Ye6x024115; Fri, 11 Jun 2004 04:34:40 -0400 (EDT) Date: Fri, 11 Jun 2004 04:34:40 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Sean McNeil In-Reply-To: <1086942520.10026.41.camel@server.mcneil.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: David Xu cc: freebsd-threads@freebsd.org Subject: Re: signal handler priority issue X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2004 08:34:57 -0000 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... -- Dan Eischen