Marcin Kielar | 2 Aug 21:32 2012
Picon

Ctrl+C not working with windows programs in Cygwin 1.7.16

Steps to reproduce:

1. Start cygwin using cygwin.bat
2. Run `ping -t google.com`
3. Try breaking it with Ctrl+C

Expected behaviur:
The ping breaks execution and the command prompt is shown and available

Actual behaviour:
Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`

Variations:
a) If, in step #1 cygwin is started with mintty (using Cygwin 
Terminal.lnk), Ctrl+C works as expected. Same with rxvt - ping breaks, 
and command prompt is shown.

b) If, in step #1 cygwin is started with console2 
(http://sourceforge.net/projects/console/), Ctrl-C behaves as in 
"actual" - i.e. does not work. This is no surprise, as console2, runs a 
hidden cmd.exe (which runs a cygwin.bat), so the behaviour should be the 
same as in pure cmd.exe.

c) If, in step #2 a bat file is run, which in turn executes Java Virtual 
Machine (a good example is an run.bat of the JBoss AS), Ctrl+C works as 
below:
   - in mintty/rxvt it appears to break the execution
     and a command prompt is show, however the JVM process keeps working
   - in cmd.exe Ctrl+C does nothing

(Continue reading)

Daniel Colascione | 2 Aug 22:26 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

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.

Roger K. Wells | 2 Aug 23:02 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

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.
(Continue reading)

Daniel Colascione | 2 Aug 23:21 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

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.

Roger K. Wells | 2 Aug 23:52 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

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 
(Continue reading)

Nellis, Kenneth | 3 Aug 14:48 2012
Picon

RE: Ctrl+C not working with windows programs in Cygwin 1.7.16

-----Original Message-----
From: Roger K. Wells
<snip>
Getting a PID & using kill just takes too long.
-----END Original Message-----

pkill from the procps package might mitigate the pain.
--Ken Nellis
Roger K. Wells | 3 Aug 14:57 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On 08/03/2012 08:48 AM, Nellis, Kenneth wrote:
> -----Original Message-----
> From: Roger K. Wells
> <snip>
> Getting a PID & using kill just takes too long.
> -----END Original Message-----
>
> pkill from the procps package might mitigate the pain.
> --Ken Nellis
that too is a work around.
The point here is what is the rationale for changing the way Cygwin bash 
works after fifteen years?
It used to behave like bash on any other OS, now it doesn't.
rkw

--

-- 
Roger Wells, P.E.
SAIC
221 Third St
Newport, RI 02840
401-847-4210 (voice)
401-849-1585 (fax)
roger.k.wells <at> saic.com

Christopher Faylor | 3 Aug 15:53 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Fri, Aug 03, 2012 at 08:57:28AM -0400, Roger K. Wells wrote:
>On 08/03/2012 08:48 AM, Nellis, Kenneth wrote:
>> -----Original Message-----
>> From: Roger K. Wells
>> <snip>
>> Getting a PID & using kill just takes too long.
>> -----END Original Message-----
>>
>> pkill from the procps package might mitigate the pain.
>> --Ken Nellis
>that too is a work around.
>The point here is what is the rationale for changing the way Cygwin bash 
>works after fifteen years?
>It used to behave like bash on any other OS, now it doesn't.

Well, we basically changed it just to piss you off.  It's a little
disappointing that it took you so long to notice.

What other reason could there possibly be?

K Stahl | 3 Aug 16:00 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

OK, I've found my example on how to resolve this issue:

Create a bash shell script and do the following:

#!/bin/bash

# Change the following to suit your application needs.
java -cp <your_classpath> <java_opts> path.to.main.line &

function finalize() {
    echo 'Terminating Application'
    kill 0
}

trap finalize SIGINT
wait

Christopher Faylor | 3 Aug 01:00 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>
>Expected behaviur:
>The ping breaks execution and the command prompt is shown and available
>
>Actual behaviour:
>Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`

I don't have a "cygwin.bat" but if I start bash via Start->Run this
works for me.  ping is interrupted by CTRL-C.

http://cygwin.com/problems.html

cgf

Daniel Colascione | 3 Aug 01:03 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On 8/2/2012 4:00 PM, Christopher Faylor wrote:
> On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>>
>> Expected behaviur:
>> The ping breaks execution and the command prompt is shown and available
>>
>> Actual behaviour:
>> Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`
> 
> I don't have a "cygwin.bat" but if I start bash via Start->Run this
> works for me.  ping is interrupted by CTRL-C.

I can repro the problem using exactly those steps. I'm using CYGWIN_NT-6.1-WOW64
xyzzy 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin. Does the most recent
snapshot have something that would make the results different?

Christopher Faylor | 3 Aug 01:09 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Thu, Aug 02, 2012 at 04:03:20PM -0700, Daniel Colascione wrote:
>On 8/2/2012 4:00 PM, Christopher Faylor wrote:
>> On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>>>
>>> Expected behaviur:
>>> The ping breaks execution and the command prompt is shown and available
>>>
>>> Actual behaviour:
>>> Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`
>> 
>> I don't have a "cygwin.bat" but if I start bash via Start->Run this
>> works for me.  ping is interrupted by CTRL-C.
>
>I can repro the problem using exactly those steps. I'm using CYGWIN_NT-6.1-WOW64
>xyzzy 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin. Does the most recent
>snapshot have something that would make the results different?

If it did I would have mentioned that fact and suggested trying a snapshot.

cgf

Roger K. Wells | 3 Aug 14:48 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On 08/02/2012 07:03 PM, Daniel Colascione wrote:
> On 8/2/2012 4:00 PM, Christopher Faylor wrote:
>> On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>>>
>>> Expected behaviur:
>>> The ping breaks execution and the command prompt is shown and available
>>>
>>> Actual behaviour:
>>> Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`
>> I don't have a "cygwin.bat" but if I start bash via Start->Run this
>> works for me.  ping is interrupted by CTRL-C.
> I can repro the problem using exactly those steps. I'm using CYGWIN_NT-6.1-WOW64
> xyzzy 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin. Does the most recent
> snapshot have something that would make the results different?
>
>
>
so can I

--

-- 
Roger Wells, P.E.
SAIC
221 Third St
Newport, RI 02840
401-847-4210 (voice)
(Continue reading)

Earnie Boyd | 3 Aug 15:43 2012
Picon
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Thu, Aug 2, 2012 at 7:00 PM, Christopher Faylor wrote:
> On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>>
>>Expected behaviur:
>>The ping breaks execution and the command prompt is shown and available
>>
>>Actual behaviour:
>>Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`
>
> I don't have a "cygwin.bat" but if I start bash via Start->Run this
> works for me.  ping is interrupted by CTRL-C.
>

If executed from mintty CTRL-C works to interrupt the process.  If
executed from a Windows console terminal (and I don't mean cmd.exe)
ping doesn't interrupt with CTRL-C.  Another interesting thing, ``run
bash --login -i'' starts the process but the Window closes with the
process in the background and I have to use the Task Manager to kill
it, Cygwin's kill doesn't kill it.  However ``run mintty'' works
regardless.

$ uname -a
CYGWIN_NT-6.1-WOW64 HAL2002 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin

--

-- 
(Continue reading)

marco atzeri | 3 Aug 15:51 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On 8/3/2012 3:43 PM, Earnie Boyd wrote:
> On Thu, Aug 2, 2012 at 7:00 PM, Christopher Faylor wrote:
>> On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>>>
>>> Expected behaviur:
>>> The ping breaks execution and the command prompt is shown and available
>>>
>>> Actual behaviour:
>>> Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`
>>
>> I don't have a "cygwin.bat" but if I start bash via Start->Run this
>> works for me.  ping is interrupted by CTRL-C.
>>
>
> If executed from mintty CTRL-C works to interrupt the process.  If
> executed from a Windows console terminal (and I don't mean cmd.exe)

a "windows console terminal" is cmd.exe, IMHO.
There are no other console in windows as standard installation.

> ping doesn't interrupt with CTRL-C.  Another interesting thing, ``run
> bash --login -i'' starts the process but the Window closes with the
> process in the background and I have to use the Task Manager to kill
> it, Cygwin's kill doesn't kill it.  However ``run mintty'' works
> regardless.
(Continue reading)

Christopher Faylor | 3 Aug 15:57 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Fri, Aug 03, 2012 at 03:51:30PM +0200, marco atzeri wrote:
>On 8/3/2012 3:43 PM, Earnie Boyd wrote:
>> On Thu, Aug 2, 2012 at 7:00 PM, Christopher Faylor wrote:
>>> On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>>>>
>>>> Expected behaviur:
>>>> The ping breaks execution and the command prompt is shown and available
>>>>
>>>> Actual behaviour:
>>>> Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`
>>>
>>> I don't have a "cygwin.bat" but if I start bash via Start->Run this
>>> works for me.  ping is interrupted by CTRL-C.
>>>
>>
>> If executed from mintty CTRL-C works to interrupt the process.  If
>> executed from a Windows console terminal (and I don't mean cmd.exe)
>
>a "windows console terminal" is cmd.exe, IMHO.
>There are no other console in windows as standard installation.
>
>> ping doesn't interrupt with CTRL-C.  Another interesting thing, ``run
>> bash --login -i'' starts the process but the Window closes with the
>> process in the background and I have to use the Task Manager to kill
>> it, Cygwin's kill doesn't kill it.  However ``run mintty'' works
(Continue reading)

Christopher Faylor | 3 Aug 16:05 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Fri, Aug 03, 2012 at 09:57:16AM -0400, Christopher Faylor wrote:
>On Fri, Aug 03, 2012 at 03:51:30PM +0200, marco atzeri wrote:
>>On 8/3/2012 3:43 PM, Earnie Boyd wrote:
>>> On Thu, Aug 2, 2012 at 7:00 PM, Christopher Faylor wrote:
>>>> On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>>>>>
>>>>> Expected behaviur:
>>>>> The ping breaks execution and the command prompt is shown and available
>>>>>
>>>>> Actual behaviour:
>>>>> Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`
>>>>
>>>> I don't have a "cygwin.bat" but if I start bash via Start->Run this
>>>> works for me.  ping is interrupted by CTRL-C.
>>>>
>>>
>>> If executed from mintty CTRL-C works to interrupt the process.  If
>>> executed from a Windows console terminal (and I don't mean cmd.exe)
>>
>>a "windows console terminal" is cmd.exe, IMHO.
>>There are no other console in windows as standard installation.
>>
>>> ping doesn't interrupt with CTRL-C.  Another interesting thing, ``run
>>> bash --login -i'' starts the process but the Window closes with the
>>> process in the background and I have to use the Task Manager to kill
(Continue reading)

marco atzeri | 3 Aug 17:36 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On 8/3/2012 4:05 PM, Christopher Faylor wrote:
> On Fri, Aug 03, 2012 at 09:57:16AM -0400, Christopher Faylor wrote:
>> On Fri, Aug 03, 2012 at 03:51:30PM +0200, marco atzeri wrote:
>>> On 8/3/2012 3:43 PM, Earnie Boyd wrote:
>>>> On Thu, Aug 2, 2012 at 7:00 PM, Christopher Faylor wrote:
>>>>> On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>>>>>>
>>>>>> Expected behaviur:
>>>>>> The ping breaks execution and the command prompt is shown and available
>>>>>>
>>>>>> Actual behaviour:
>>>>>> Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`
>>>>>
>>>>> I don't have a "cygwin.bat" but if I start bash via Start->Run this
>>>>> works for me.  ping is interrupted by CTRL-C.

>
> And, to add to the thread: clueless developer running a cygwin version
> of ping.exe.  I *can* duplicate the problem when I specifically run the
> windows ping rather than the Cygwin one.  I thought I'd deleted the
> Cygwin ping years ago but...  I was wrong.
>

Hi cgf,
I thought you mentioned "I don't have a "cygwin.bat"" exactly because
(Continue reading)

Corinna Vinschen | 3 Aug 16:07 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Aug  3 09:57, Christopher Faylor wrote:
> On Fri, Aug 03, 2012 at 03:51:30PM +0200, marco atzeri wrote:
> [...]
> >a "windows console terminal" is cmd.exe, IMHO.
> >There are no other console in windows as standard installation.

No, no, three times no.

Cmd.exe is just a console application using the Windows console facility
and it always was.

Up to Windows Vista/2008, the Windows console facility is implemented
partially as library and partially as a (kind of) service within csrss.

Starting with Windows 7, Microsoft introduced a special application
called "conhost.exe" which provides the console implementation.

Please stop thinking of cmd and the Windows console being one and the
same. 

> [...]
> This thread has it all.  Affronted user, useless pile on, and now we
> start to drift away from the actual subject.
> 
> It's a little early here for popcorn but I'm tempted anyway.

I'm terribly sorry, but I just can't let the above slip through.
Herewith I mark this posting officially as off topic *stamp*.

Corinna
(Continue reading)

Christopher Faylor | 3 Aug 16:32 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Fri, Aug 03, 2012 at 04:07:39PM +0200, Corinna Vinschen wrote:
>On Aug  3 09:57, Christopher Faylor wrote:
>>This thread has it all.  Affronted user, useless pile on, and now we
>>start to drift away from the actual subject.
>>
>>It's a little early here for popcorn but I'm tempted anyway.
>
>I'm terribly sorry, but I just can't let the above slip through.
>Herewith I mark this posting officially as off topic *stamp*.

I don't think you can mark a message which was subtly suggesting that
another message was off-topic as being off-topic itself.  We need to be
careful here since the mailing list software can't really handle very
much recursion.

But, what the heck.  I hereby mark my above message as also off-topic.

cgf

Earnie Boyd | 3 Aug 16:01 2012
Picon
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Fri, Aug 3, 2012 at 9:51 AM, marco atzeri wrote:
> On 8/3/2012 3:43 PM, Earnie Boyd wrote:
>>
>> On Thu, Aug 2, 2012 at 7:00 PM, Christopher Faylor wrote:
>>>
>>> On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>>>>
>>>> Expected behaviur:
>>>> The ping breaks execution and the command prompt is shown and available
>>>>
>>>> Actual behaviour:
>>>> Nothing happens, ping loops until killed with `/usr/bin/kill -f PID`
>>>
>>>
>>> I don't have a "cygwin.bat" but if I start bash via Start->Run this
>>> works for me.  ping is interrupted by CTRL-C.
>>>
>>
>> If executed from mintty CTRL-C works to interrupt the process.  If
>> executed from a Windows console terminal (and I don't mean cmd.exe)
>
>
> a "windows console terminal" is cmd.exe, IMHO.
> There are no other console in windows as standard installation.
(Continue reading)

Andrey Repin | 7 Aug 10:20 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

Greetings, marco atzeri!

> a "windows console terminal" is cmd.exe, IMHO.

No.

> There are no other console in windows as standard installation.

You're confusing terminal with shell.
CMD.EXE is a shell, same as BASH.
Console is a ... well, console.

--
WBR,
Andrey Repin (anrdaemon <at> freemail.ru) 07.08.2012, <12:19>

Sorry for my terrible english...

marco atzeri | 7 Aug 12:06 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On 8/7/2012 10:20 AM, Andrey Repin wrote:
> Greetings, marco atzeri!
>
>> a "windows console terminal" is cmd.exe, IMHO.
>
> No.
>
>> There are no other console in windows as standard installation.
>
> You're confusing terminal with shell.
> CMD.EXE is a shell, same as BASH.
> Console is a ... well, console.
>
>
> --
> WBR,
> Andrey Repin (anrdaemon <at> freemail.ru) 07.08.2012, <12:19>
>
> Sorry for my terrible english...
>

I guess Corinna already explained that, and I have no objections.

But I still need to see a practical example of
running a M$ program like ping and stopping it with Ctrl+C
without CMD (or another shell).

Regards
Marco

(Continue reading)

Corinna Vinschen | 7 Aug 12:40 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Aug  7 12:06, marco atzeri wrote:
> On 8/7/2012 10:20 AM, Andrey Repin wrote:
> >Greetings, marco atzeri!
> >
> >>a "windows console terminal" is cmd.exe, IMHO.
> >
> >No.
> >
> >>There are no other console in windows as standard installation.
> >
> >You're confusing terminal with shell.
> >CMD.EXE is a shell, same as BASH.
> >Console is a ... well, console.
> >
> >
> >--
> >WBR,
> >Andrey Repin (anrdaemon <at> freemail.ru) 07.08.2012, <12:19>
> >
> >Sorry for my terrible english...
> >
> 
> I guess Corinna already explained that, and I have no objections.
> 
> But I still need to see a practical example of
> running a M$ program like ping and stopping it with Ctrl+C
> without CMD (or another shell).

Why don't you just try it?  On W7:

(Continue reading)

Andrey Repin | 7 Aug 16:21 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

Greetings, Corinna Vinschen!

>> But I still need to see a practical example of
>> running a M$ program like ping and stopping it with Ctrl+C
>> without CMD (or another shell).

> Why don't you just try it?  On W7:

Start Menu ->> Run... -> Enter "ping -t cygwin.com" -> Start Task Manager
->> Observe the absence of cmd.exe but the presence of conhost.exe ->
> Press Ctrl-C in the ping console window.

That would work for, basically, any Windows version, starting WinNT.

--
WBR,
Andrey Repin (anrdaemon <at> freemail.ru) 07.08.2012, <18:20>

Sorry for my terrible english...

Corinna Vinschen | 7 Aug 17:24 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Aug  7 18:21, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> >> But I still need to see a practical example of
> >> running a M$ program like ping and stopping it with Ctrl+C
> >> without CMD (or another shell).
> 
> > Why don't you just try it?  On W7:
> 
> Start Menu ->> Run... -> Enter "ping -t cygwin.com" -> Start Task Manager
> ->> Observe the absence of cmd.exe but the presence of conhost.exe ->
> > Press Ctrl-C in the ping console window.
> 
> That would work for, basically, any Windows version, starting WinNT.

Of course, just that you won't see conhost.exe in Task Manager prior
to W7.

Corinna

--

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Christopher Faylor | 3 Aug 18:23 2012

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>
>Expected behaviur:
>The ping breaks execution and the command prompt is shown and available

I've uploaded a snapshot which should fix this issue.  It's likely that
we will now hear from the other contingent of people who will be outraged
that Cygwin now behaves differently.

Welcome to Cygwin Open Source development.

http://cygwin.com/snapshots/

cgf

Roger K. Wells | 3 Aug 19:31 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On 08/03/2012 12:23 PM, Christopher Faylor wrote:
> On Thu, Aug 02, 2012 at 09:32:09PM +0200, 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
>>
>> Expected behaviur:
>> The ping breaks execution and the command prompt is shown and available
> I've uploaded a snapshot which should fix this issue.
seems to have fixed it. Thanks
> It's likely that
> we will now hear from the other contingent of people who will be outraged
> that Cygwin now behaves differently.
>
> Welcome to Cygwin Open Source development.
>
> http://cygwin.com/snapshots/
>
> cgf
>
> --
> 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
>
>
>
(Continue reading)

Marcin Kielar | 3 Aug 20:51 2012
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

2012-08-03 18:23, Christopher Faylor:
> I've uploaded a snapshot which should fix this issue.

Confirmed to be working on snapshot 20120803:

1. Ctrl+C breaks ping loop - OK
2. Ctrl+C breaks Java process started through a `bat` file - OK

> It's likely that
> we will now hear from the other contingent of people who will be outraged
> that Cygwin now behaves differently.
>
> Welcome to Cygwin Open Source development.

I salute you from the corporate hell of clueless users and conflicting 
requirements. ;-)

--

-- 
Marcin Kielar

Earnie Boyd | 3 Aug 22:45 2012
Picon
Picon

Re: Ctrl+C not working with windows programs in Cygwin 1.7.16

On Fri, Aug 3, 2012 at 2:51 PM, Marcin Kielar wrote:
> 2012-08-03 18:23, Christopher Faylor:
>
>> I've uploaded a snapshot which should fix this issue.
>
>
> Confirmed to be working on snapshot 20120803:
>
> 1. Ctrl+C breaks ping loop - OK
> 2. Ctrl+C breaks Java process started through a `bat` file - OK

It also resolves the side issue of ``run bash --login -i'' not
returning the parent process to the prompt.

--

-- 
Earnie
-- https://sites.google.com/site/earnieboyd


Gmane