Menu

#416 Ctrl+C does not work under cygwin for non-cygwin programs

closed-invalid
nobody
None
1
2012-08-06
2012-08-01
Anonymous
No

Steps to reproduce:
1. Install cygwin (vanilla install, no changes to ~/.dotfiles)
2. Start c:\cygwin\cygwin.bat inside console2 (or start c:\cygwin\bin\bash --login -i), or as a new tab - does not seem to matter how, just get inside the bash.
3. Run: `ping -t google.com` (or apache ant, or start jboss, or whatever non-cygwin)
4. Press Ctrl+C

Expected behavior:
The ping loop is stopped, and a command prompt is available

Actual behavior:
Nothing happens, ping continues looping

Additional info:
When doing the same inside cygwin's mintty, everything works as expected.
When doing the same inside windows command prompt (cmd.exe), the behavior is the same as in console2

When running cygwin programs (like `find / *.txt`), Ctrl+C works as expected.

Versions:
Windows XP Proffessional PL 32bit, Windows 7 Home Pro PL 64 bit
Cygwin 1.7.15 (also Cygwin-SNAPSHOT from 2012-08-01)
Console2 2.00.147

Discussion

  • Kirill

    Kirill - 2012-08-01
    • priority: 5 --> 1
    • status: open --> pending-invalid
     
  • Kirill

    Kirill - 2012-08-01

    If cmd.exe can't do it, Console will not be able to do it.
    You can try creating a tab with "c:\cygwin\bin\bash --login -i" (without quotes) as shell and see if it works better.

     
  • Anonymous

    Anonymous - 2012-08-01

    akirill - tried that, but it does not work either.
    The funny thing is - I'm almost certain it worked a few cygwin wersions ago.

    Anyway, mintty does this somehow, so perhaps a quick peek at it's code would help...

    The problem is, using console2 is pointless if I cannot break program execution, and killing everything with kill -9 is terribly cumbersome.

     
  • Anonymous

    Anonymous - 2012-08-01
    • status: pending-invalid --> open-invalid
     
  • Kirill

    Kirill - 2012-08-01
    • status: open-invalid --> pending-invalid
     
  • Kirill

    Kirill - 2012-08-01

    The fact that mintty does it is not going to help because all Console does is screen-scraping of the underlying shell and forwarding input to the underlying shell. So, if your shell - cmd - can't break the program, Console has no way to break it.

     
  • Anonymous

    Anonymous - 2012-08-06
    • status: pending-invalid --> closed-invalid
     
  • Anonymous

    Anonymous - 2012-08-06
    • status: closed-invalid --> open-invalid
     
  • Anonymous

    Anonymous - 2012-08-06
    • status: open-invalid --> closed-invalid
     
  • Anonymous

    Anonymous - 2012-11-12

    Hello,

    I'm having a similar problem when using msys. I've configured a new tab:

    Shell: C:\msys\1.0\bin\sh.exe --login -i

    Opening the tab and using CTRL+C doesn't do anything. It *does* work in a simple cmd.exe window, but not under Console2. I don't have any hotkeys set for CTR+C, so no conflicts there.

     
  • Anonymous

    Anonymous - 2012-11-13

    Nevermind, it started working again. I think it's related to the mouse selection setting.

     

    Last edit: Anonymous 2015-12-02

Log in to post a comment.