This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: cygwin apps in pipe ignore ctrl+c
- To: "Tim Baker" <dbaker at direct dot ca>
- Subject: Re: cygwin apps in pipe ignore ctrl+c
- From: egor duda <deo at logos-m dot ru>
- Date: Wed, 18 Apr 2001 21:48:18 +0400
- CC: cygwin at cygwin dot com
- Organization: deo
- References: <002101c0c82e$8206abe0$3e8a42d8@hpcustomer>
- Reply-To: egor duda <cygwin at cygwin dot com>
Hi!
Wednesday, 18 April, 2001 Tim Baker dbaker@direct.ca wrote:
TB> I have a console app MyApp which runs in a pipe. MyApp calls
TB> CreateProcess() to launch OtherApp and later calls
TB> GenerateConsoleCtrlEvent() to send Ctrl+C to OtherApp. When
TB> OtherApp is non-Cygwin it is interrupted cleanly just as though
TB> the user had typed Ctrl+C from in the DOS window. But when
TB> OtherApp is a Cygwin application it ignores any number of
TB> CTRL_C_EVENTs I send and continues running. So a Cygwin
TB> app must be calling SetConsoleCtrlHandler() to intercept the
TB> CTRL_C_EVENT but for some reason it is not behaving properly
TB> when the Cygwin app is *running in a pipe*. (The Cygwin app IS
TB> attached to a Win32 console window which is required for
TB> GenterateConsoleCtrlEvent() to work.)
use kill() function to interrupt cygwin application. this is a normal
unix way to do such things.
Egor. mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple