delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/08/02/17:52:42

X-Recipient: archive-cygwin AT delorie DOT com
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
Message-Id: <501AF686.6020109@saic.com>
Date: Thu, 02 Aug 2012 17:52:06 -0400
From: "Roger K. Wells" <ROGER DOT K DOT WELLS AT saic DOT com>
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 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> <501AE25A DOT 3000309 AT dancol DOT org> <501AEACC DOT 7080604 AT saic DOT com> <501AEF74 DOT 60909 AT dancol DOT org>
In-Reply-To: <501AEF74.60909@dancol.org>
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

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 DOT k DOT wells AT saic DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019