Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <002101c0c82e$8206abe0$3e8a42d8@hpcustomer>
From: "Tim Baker" <dbaker@direct.ca>
To: <cygwin@cygwin.com>
Subject: cygwin apps in pipe ignore ctrl+c
Date: Wed, 18 Apr 2001 10:39:22 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

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

