Signal handling in Win32 GUI programs

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Sun Jan 11 16:57:00 GMT 2009


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/



More information about the Cygwin mailing list