delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_THREADED,SPF_HELO_PASS,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <501AE25A.3000309@dancol.org> |
Date: | Thu, 02 Aug 2012 13:26:02 -0700 |
From: | Daniel Colascione <dancol AT dancol DOT org> |
User-Agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Ctrl+C not working with windows programs in Cygwin 1.7.16 |
References: | <501AD5B9 DOT 5030005 AT gmail DOT com> |
In-Reply-To: | <501AD5B9.5030005@gmail.com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
--------------enigF3A676FB7DF6FD42598CFD40 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 8/2/2012 12:32 PM, Marcin Kielar wrote: > Steps to reproduce: >=20 > 1. Start cygwin using cygwin.bat > 2. Run `ping -t google.com` > 3. Try breaking it with Ctrl+C This problem arises from Cygwin's use of CREATE_NEW_PROCESS_GROUP. From MSD= N: "When a process is created with CREATE_NEW_PROCESS_GROUP specified, an impl= icit call to SetConsoleCtrlHandler(NULL,TRUE) is made on behalf of the new proce= ss; this means that the new process has CTRL+C disabled. This lets shells handle CTRL+C themselves, and selectively pass that signal on to sub-processes. CTRL+BREAK is not disabled, and may be used to interrupt the process/proces= s group." SetConsoleCtrlHandler(NULL,TRUE) tells a process and all its children to ig= nore control-C. This problem only affects programs run in a console --- in a pty, Cygwin just terminates Windows processes in response to SIGINT. --------------enigF3A676FB7DF6FD42598CFD40 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAa4l4ACgkQ17c2LVA10Vs50QCg13Nx2zpR6m60o2bjiiuu+/gu tskAn2JW/XyIGjfjjVRRO00C3fCsZMth =SUH4 -----END PGP SIGNATURE----- --------------enigF3A676FB7DF6FD42598CFD40--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |