terminal: CTRL C doesn't work properly on gitbash

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable): v1.3.2651.0

Any other software? Gitbash

Steps to reproduce

Expected behavior

Ctrl C works on gitbash when i run tsc --watch (tsc is microsoft typescript compiler) . But in windows terminal CTRL + C doesn’t work it only response once typescript --watch is fully ready. I would like to ctrl +c before tsc --watch command start to be ready.

Its not just this app but most cli apps i use have similar issue.

Actual behavior

When i do ctrl + c it stucks for few moment till command line is fully ready and only it interrupts the program.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 5
  • Comments: 23 (5 by maintainers)

Most upvoted comments

Sorry. =] If I hold Ctrl and then press “C” rapidly several times, I will get the stall. But if I press “C” less often it prints ^C to the terminal and I get a new prompt, as usual.

Here’s an example of me holding down ctrl+c (frame-rate is low but you can see what’s happening). It stays unresponsive for almost exactly 60 seconds.

ctrlcgif


Also, for what it’s worth, running exit after it becomes responsive again shows [Process exited with code 130]

Its so annoying. Windows terminal responds like after 20 seconds for ctrl +c 😦

I encountered same issue since many months ago, and this bug is stil there. I’m using Windows Terminal (Windows App Store version v1.6.10571.0) with PSCore 7.1.3

I type ping -t <someIPAddress>

image

I can Ctrl+Break and print statistic information.

image

But I can’t Ctrl+C and stop ping command. This does NOT repro EVERY TIME. So I guess this will be hard to fix.

I suggest you open many tabs in Windows Terminal and ping some IP address for many hours with “-t” parameter and then try to terminate them with Ctrl+C shortcut.

Does this happen outside of Windows Terminal?

It is possible that the program is not ready to respond to ^C yet. This is a normal thing.