X-Spam-Check-By: sourceware.org Message-ID: <43FF6AED.1060102@steeleye.com> Date: Fri, 24 Feb 2006 15:22:05 -0500 From: Paul Clements User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: cygwin AT cygwin DOT com CC: ernie DOT coskrey AT steeleye DOT com Subject: Re: Shells hang during script execution Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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:40:33PM -0500, Christopher Faylor wrote: > Actually, I spoke too soon. I don't understand your analysis. > You make this statement: >>However, if the queueing of the blocked signal happens right after the >>signal mask change, then we miss the signal. > but I don't understand how you came to this conclusion. If the signal > mask > changes, then the queue should be flushed -- that's what the __SIGFLUSH is > for. So, even if something is added to the queue while the mask is changing, > the function which changes the mask should eventually call send_sig to > cause > the wait_sig thread to run the queue. > So, this patch would seem to be a band-aid over some other problem. OK, I think I see what is happening now: set_signal_mask() does indeed call sig_dispatch_pending() to do a flush when the signal mask changes. However, when the sigq is empty, sig_dispatch_pending() just returns! See: sig_dispatch_pending (bool fast) { -if (exit_state || &_my_tls == _sig_tls || !sigq.start.next) +if (exit_state || &_my_tls == _sig_tls) Unfortunately, when I make this change, everything hangs. Not sure what the issue is there. Any ideas? Thanks, Paul (please CC, I'm not on the list) -- 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/