delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/23/16:40:42

X-Spam-Check-By: sourceware.org
Date: Thu, 23 Feb 2006 16:40:33 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Shells hang during script execution
Message-ID: <20060223214033.GA356@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <A7E7241463A43B46B90F37197A667AE3055185 AT STEELPO DOT steeleye DOT com>
Mime-Version: 1.0
In-Reply-To: <A7E7241463A43B46B90F37197A667AE3055185@STEELPO.steeleye.com>
User-Agent: Mutt/1.5.11
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Thu, Feb 23, 2006 at 04:33:45PM -0500, Ernie Coskrey wrote:
>There are two hang conditions that we've identified and have developed fixes for.  This is a description of the first of the two along with a patch; I'll follow up with a description and patch for the second.
>
>
>If a signal can't be handled because it is blocked, it gets queued (on 
>the process's "sigq") to be handled later. Now, whenever the process's 
>signal mask changes (e.g., the signal in question gets unblocked), an 
>attempt is made to handle all the queued signals (i.e., a signal flush 
>occurs). However, if the queueing of the blocked signal happens right 
>after the signal mask change, then we miss the signal. This causes the 
>process to hang. The signal is on the queue, but the process doesn't 
>know to check for it. The process just hangs until another signal gets 
>sent to it.
>
>The workaround is basically to force the signal queue to be rescanned 
>(flushed) whenever we add something to it, so a queued signal is never 
>missed.

Thanks for the analysis and the patch.

But, a backwards goto into a case?  Yuck.  I'll see if I can come up
with something better.

cgf

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019