delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/11/11:38:19

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Sun, 11 Jan 2009 11:37:29 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Signal handling in Win32 GUI programs
Message-ID: <20090111163729.GB9992@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <496A1DBC DOT 7070004 AT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <496A1DBC.7070004@gmail.com>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Note-from-DJ: This may be spam

On Sun, Jan 11, 2009 at 04:26:36PM +0000, Andy Koppe wrote:
> 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 don't know if this is what you are seeing but If you are blocked in a
Windows function like WaitMessage or WaitForSingleObject, the signal
will not be delivered until some random time after you leave the
function.  We used to try to interrupt blocking windows functions but it
caused too many unpredictable problems.

One way around this is to start a thread and wait for signals in that
thread.

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