From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6864 invoked by alias); 2 Aug 2012 21:52:34 -0000 Received: (qmail 6854 invoked by uid 22791); 2 Aug 2012 21:52:33 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mclmx.mail.saic.com (HELO mclmx.mail.saic.com) (149.8.64.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Aug 2012 21:52:19 +0000 Received: from dc04p-em-sbg03.saic.com ([149.8.64.21] [149.8.64.21]) by mclmx.mail.saic.com with ESMTP id BT-MMP-5705340 for cygwin@cygwin.com; Thu, 2 Aug 2012 17:52:11 -0400 Received: from 0015-its-exbh03.us.saic.com (mcl-sixl-nat.saic.com [149.8.64.21]) by dc04p-em-sbg03.saic.com (Symantec Messaging Gateway) with SMTP id 7B.EC.27859.B86FA105; Thu, 2 Aug 2012 17:52:11 -0400 (EDT) Received: from 0015-its-exbh01.us.saic.com ([10.43.229.18]) by 0015-its-exbh03.us.saic.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 2 Aug 2012 17:52:11 -0400 Received: from dc01p-em-exfe02.us.saic.com ([139.121.144.71]) by 0015-its-exbh01.us.saic.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 2 Aug 2012 17:52:08 -0400 Received: from [10.40.90.16] ([139.121.144.120]) by dc01p-em-exfe02.us.saic.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 2 Aug 2012 16:52:07 -0500 Message-Id: <501AF686.6020109@saic.com> Date: Thu, 02 Aug 2012 21:55:00 -0000 From: "Roger K. Wells" User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Ctrl+C not working with windows programs in Cygwin 1.7.16 References: <501AD5B9.5030005@gmail.com> <501AE25A.3000309@dancol.org> <501AEACC.7080604@saic.com> <501AEF74.60909@dancol.org> In-Reply-To: <501AEF74.60909@dancol.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-08/txt/msg00072.txt.bz2 On 08/02/2012 05:21 PM, Daniel Colascione wrote: > On 8/2/2012 2:02 PM, Roger K. Wells wrote: >> On 08/02/2012 04:26 PM, Daniel Colascione wrote: >>> On 8/2/2012 12:32 PM, Marcin Kielar wrote: >>>> Steps to reproduce: >>>> >>>> 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 MSDN: >>> >>> "When a process is created with CREATE_NEW_PROCESS_GROUP specified, an implicit >>> call to SetConsoleCtrlHandler(NULL,TRUE) is made on behalf of the new process; >>> 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/process >>> group." >>> >>> SetConsoleCtrlHandler(NULL,TRUE) tells a process and all its children to ignore >>> control-C. This problem only affects programs run in a console --- in a pty, >>> Cygwin just terminates Windows processes in response to SIGINT. >>> >> This may be true but it is a recent development. > ISTR a change a little while ago that made Cygwin not send SIGINT to processes > controlled by actual consoles (as opposed to ptys) under the assumption that the > Windows console machinery would do the job. It looks like the two changes > interact unpleasantly. > > I can't tell how much I want the old way back. I'll have to start using the MS command prompt. Getting a PID & using kill just takes too long. -- Roger Wells, P.E. SAIC 221 Third St Newport, RI 02840 401-847-4210 (voice) 401-849-1585 (fax) roger.k.wells@saic.com -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple