Hi,

I have a Cygwin program that:

- registers a SIGINT handler, via signal(SIGINT,h)
- creates a window, using Win32 CreateWindow
- and is then calling PeekMessage for that window in a loop

It appears that while PeekMessage is being called, any SIGINTs sent to the
program are lost. Is this to be expected as it's not really supported or a
bug?

To reproduce:

- Compile and run the attached example program, and repeatedly press CTRL-C
in the console. 
- Only maybe 1 of every 10 or 20 times CTRL-C is pressed, is the signal
handler called.
- Similarly, running 'kill -SIGINT PID' results in most of the signals being
ignored.
- Remove the call to PeekMessage, and the signals are received. 

Cheers,
Jon


Windows 10 Professional Ver 10.0 Build 18363
    Cygwin DLL version info:
        DLL version: 3.1.5

Attachment: sigint_example.c
Description: Binary data

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to