X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 	tests=AWL,BAYES_00,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Waldemar Rachwal <waldemar.rachwal@gmail.com>
Subject:  Re: [1.7] sigwait bug (SIGCHLD delayed to a next regular signal)
Date: Mon, 21 Sep 2009 08:32:47 +0000 (UTC)
Lines: 30
Message-ID:  <loom.20090921T103139-168@post.gmane.org>
References:  <loom.20090918T184921-716@post.gmane.org>  <20090918213522.GA12527@ednor.casa.cgf.cx>  <loom.20090919T114836-897@post.gmane.org> <20090919144319.GA31739@ednor.casa.cgf.cx>
Mime-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7bit
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Christopher Faylor <cgf-use-the-mailinglist-please <at> cygwin.com> writes:

> 
> On Sat, Sep 19, 2009 at 10:31:58AM +0000, Waldemar Rachwal wrote:
> >
> >If the action associated with a blocked signal is anything other than to
> >ignore the signal, and if that signal is generated for the thread,
> >
> 
> Since the "above" never mentioned the word handler, I don't see how your
> point is valid.  (...)  
> Setting the handler doesn't seem to serve any useful purpose since it isn't
> being used.

To satisfy the condition (quoted from posix) "action is anything other than to
ignore",
SIGCHLD (and all other signals which default action is to ignore) must be setup
a handler even if it seems "not useful". Being blocked is not sufficient.

> 
> In any event, you provided a test case, I provided a fix.  That's the
> desired outcome.  Arguing about this is pointless unless the fix didn't
> actually fix anything.
> 

Completely agree. I hope not to start 3rd thread on the same problem anymore
(the root cause of the problem from
http://sourceware.org/ml/cygwin/2009-08/msg00797.html
is exactly the same as from this thread).



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

