public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Roger K. Wells" <ROGER.K.WELLS@saic.com>
To: cygwin@cygwin.com
Subject: Re: Ctrl+C not working with windows programs in Cygwin 1.7.16
Date: Thu, 02 Aug 2012 21:22:00 -0000	[thread overview]
Message-ID: <501AEACC.7080604@saic.com> (raw)
In-Reply-To: <501AE25A.3000309@dancol.org>

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.
 From the similar thread that specifies a java process my remarks:

> This is still a problem.
> CYGWIN_NT-6.1 rwells-w7 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin
>
> We have been developing CLI applications for close to 20 years and 
> have never had a
> problem with the cygwin bash shell failing to pass Ctrl-C signals to 
> the application until now.
> Luckily the cmd.exe still does.
>
> Let me know if it something that I can help track down.  Glad to help 
> if possible.
>

-- 
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

  reply	other threads:[~2012-08-02 21:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02 19:34 Marcin Kielar
2012-08-02 21:02 ` Daniel Colascione
2012-08-02 21:22   ` Roger K. Wells [this message]
2012-08-02 21:35     ` Daniel Colascione
2012-08-02 21:55       ` Roger K. Wells
2012-08-03 12:48         ` Nellis, Kenneth
2012-08-03 13:34           ` Roger K. Wells
2012-08-03 13:57             ` Christopher Faylor
2012-08-03 14:01               ` K Stahl
2012-08-02 23:03 ` Christopher Faylor
2012-08-02 23:10   ` Daniel Colascione
2012-08-03  3:05     ` Christopher Faylor
2012-08-03 12:58     ` Roger K. Wells
2012-08-03 13:51   ` Earnie Boyd
2012-08-03 13:53     ` marco atzeri
2012-08-03 14:00       ` Christopher Faylor
2012-08-03 14:08         ` Christopher Faylor
2012-08-03 14:33         ` Corinna Vinschen
2012-08-03 15:57           ` Christopher Faylor
2012-08-03 14:06       ` Earnie Boyd
2012-08-07  8:45       ` Andrey Repin
2012-08-07 10:35         ` marco atzeri
2012-08-07 11:00           ` Corinna Vinschen
2012-08-07 14:55             ` Andrey Repin
2012-08-07 15:56               ` Corinna Vinschen
2012-08-03 17:32 ` Christopher Faylor
2012-08-03 18:51   ` Roger K. Wells
2012-08-03 19:19   ` Marcin Kielar
2012-08-03 22:34     ` Earnie Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=501AEACC.7080604@saic.com \
    --to=roger.k.wells@saic.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).