Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ctrl-c Not stopping Tomcat using Git Bash

As the title says, I'm running Tomcat on Git Bash using Windows 7 and I am unable to close the server using Ctrl-c. When I press it, the cursor disappears for half a second but other than that nothing happens at all.

EDIT: Running git bash in VSCode's integrated terminal allows me to use ctrl-c normally.

EDIT 2: After updating to 2.18 at certain times during the build I can stop it with ctrl-c, However not after the server has started up. ctrl-c works properly at all time when I'm using git bash in VSCode's integrated terminal.

SOLUTION: I was using the git-bash in the git folder and if I just switch to bash located in the bin everything works fine. This is why VSCode was working (I had it set up to use that one)

like image 673
WillK Avatar asked Jun 07 '18 22:06

WillK


2 Answers

that was also happen to me for some time

Ctrl-C not killing the process or stop asking for input in GitBash

then I realize I was pressing Ctrl-C like I always pressed but

In GitBash

it takes more time to kill the process

So, Press Ctrl-C for 1 or 1.5 or even 2 seconds

that worked in my case

I am hoping that will work for you too

for your information.

My Current Version is: Git 2.16

UPDATE

It also can happen for not updating the version

I just updated it and it working fine

My Current Version is: Git 2.18

like image 135
SHAH MD IMRAN HOSSAIN Avatar answered Nov 16 '22 06:11

SHAH MD IMRAN HOSSAIN


I had the same problem git-bash could not stop maven with ctrl-c.

After checking the shortcut in the start menu it was clear that the link to C:\Program Files\Git\git-bash.exe was used.

After switching to C:\Program Files\Git\bin\sh.exe, maven could be stopped with ctrl-c without any problems.


Versions

Git: 2.26.2.windows.1

OS: Windows 10

like image 3
Ben Asmussen Avatar answered Nov 16 '22 08:11

Ben Asmussen