SIGINT lost while program calls PeekMessage
Jon Beniston
jon@beniston.com
Thu Jul 2 16:16:10 GMT 2020
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sigint_example.c
Type: application/octet-stream
Size: 1858 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin/attachments/20200702/e985cdc6/attachment-0001.obj>
More information about the Cygwin
mailing list