From owner-freebsd-questions@FreeBSD.ORG Mon May 18 21:50:07 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C50DD106566B for ; Mon, 18 May 2009 21:50:07 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout022.mac.com (asmtpout022.mac.com [17.148.16.97]) by mx1.freebsd.org (Postfix) with ESMTP id B1D128FC13 for ; Mon, 18 May 2009 21:50:07 +0000 (UTC) (envelope-from cswiger@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from cswiger1.apple.com ([17.227.140.124]) by asmtp022.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KJV00C6Y0MCL200@asmtp022.mac.com> for freebsd-questions@freebsd.org; Mon, 18 May 2009 14:49:48 -0700 (PDT) Message-id: From: Chuck Swiger To: Peter Steele In-reply-to: <30551570.941242683137179.JavaMail.HALO$@halo> Date: Mon, 18 May 2009 14:49:24 -0700 References: <30551570.941242683137179.JavaMail.HALO$@halo> X-Mailer: Apple Mail (2.935.3) Cc: #freebsd-questions Subject: Re: Why would a kill -2 not work? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2009 21:50:08 -0000 Hi-- On May 18, 2009, at 2:45 PM, Peter Steele wrote: > This is basically what we doing. When the handler is triggered we > set a global variable to indicate the system is shutting down. I > also signal a condition to wake up a sleeping thread. The lack of > log messages indicate that this handler never gets called and the > system carries on as if the kill -2 never happened. You're not trying to send a signal within the signal handler itself, are you? That won't work-- signal delivery is blocked when you're already running in a signal handler. Also, note that trying to mix signals with a multithreaded process is complicated.... -- -Chuck