X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <496A1DBC.7070004@gmail.com>
Date: Sun, 11 Jan 2009 16:26:36 +0000
From: Andy Koppe <andy.koppe@gmail.com>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Signal handling in Win32 GUI programs
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
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

Hi,

Is there something special about signal handling in Win32 GUI programs? 
With MinTTY, I'm finding that signals sent to it are only delivered when 
writing data to the child process (i.e. when you try to kill it, it 
stays open until a key is pressed).

I guess that's fair enough in as far as POSIX doesn't guarantee anything 
about signal delivery time, but the description in the user's guide does 
sound as if it should be fairly immediate:

"When a Cygwin process starts, the library starts a secondary thread for 
use in signal handling. This thread waits for Windows events used to 
pass signals to the process. When a process notices it has a signal, it 
scans its signal bitmask and handles the signal in the appropriate fashion."

Also, there's no such problem with rxvt, so is there anything obvious I 
might be doing wrong? Or are there any tricks, ideally not involving 
polling, that I should be using?

Andy

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

