cygwin apps in pipe ignore ctrl+c
Tim Baker
dbaker@direct.ca
Wed Apr 18 10:40:00 GMT 2001
I have a console app MyApp which runs in a pipe. MyApp calls
CreateProcess() to launch OtherApp and later calls
GenerateConsoleCtrlEvent() to send Ctrl+C to OtherApp. When
OtherApp is non-Cygwin it is interrupted cleanly just as though
the user had typed Ctrl+C from in the DOS window. But when
OtherApp is a Cygwin application it ignores any number of
CTRL_C_EVENTs I send and continues running. So a Cygwin
app must be calling SetConsoleCtrlHandler() to intercept the
CTRL_C_EVENT but for some reason it is not behaving properly
when the Cygwin app is *running in a pipe*. (The Cygwin app IS
attached to a Win32 console window which is required for
GenterateConsoleCtrlEvent() to work.)
-- Tim Baker
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list