X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 	tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <496C42C7.8040104@gmail.com>
References: <496A1DBC.7070004@gmail.com> 	 <20090111163729.GB9992@ednor.casa.cgf.cx> <496A24DE.1080101@gmail.com> 	 <20090111180740.GC10049@ednor.casa.cgf.cx> 	 <496A5C5D.9030703@gmail.com> 	 <20090112004125.GE21040@ednor.casa.cgf.cx> 	 <496C42C7.8040104@gmail.com>
Date: Tue, 13 Jan 2009 08:44:01 +0000
Message-ID: <2ce9650b0901130044x28e84d00m1dc5530bddf1ecbd@mail.gmail.com>
Subject: Re: Signal handling in Win32 GUI programs
From: Chris January <chris@atomice.net>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

On Tue, Jan 13, 2009 at 7:29 AM, Andy Koppe wrote:
> Actually I still can't quite get signal handling in MinTTY to work right.
> SIGINT is fine, but SIGTERM, SIGHUP, and SIGKILL don't seem to get to
> sigwait(), instead still invoking the default handler, i.e. terminating
> MinTTY without SIGHUP being sent to the command inside it.

> Anything obvious missing?

Shouldn't pthread_sigmask be called for signal_thread as well?
From the Linux manual page:
"In a multithreaded program, the signal should be blocked in all
threads to prevent the signal being delivered to a thread other than
the one calling sigwaitinfo() or sigtimedwait()). "
But maybe that doesn't apply to Cygwin.

Chris

--
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/

