Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2009 14:49:24 -0700
From:      Chuck Swiger <cswiger@mac.com>
To:        Peter Steele <psteele@maxiscale.com>
Cc:        #freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Why would a kill -2 not work?
Message-ID:  <D12FD20D-4758-4FC6-B507-603C9A425EF2@mac.com>
In-Reply-To: <30551570.941242683137179.JavaMail.HALO$@halo>
References:  <30551570.941242683137179.JavaMail.HALO$@halo>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D12FD20D-4758-4FC6-B507-603C9A425EF2>