Ctrl-c不使用Git Bash停止Tomcat [英] Ctrl-c Not stopping Tomcat using Git Bash

查看:82
本文介绍了Ctrl-c不使用Git Bash停止Tomcat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述,我正在使用Windows 7在Git Bash上运行Tomcat,但无法使用Ctrl-c关闭服务器.当我按下它时,光标消失了半秒钟,但除此之外什么也没有发生.

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.

在VSCode的集成终端中运行git bash可使我正常使用ctrl-c.

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

在构建过程中的某些时间更新到2.18之后,我可以使用ctrl-c停止它,但是在服务器启动后就不能停止.当我在VSCode的集成终端中使用git bash时,ctrl-c始终可以正常工作.

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.

解决方案:我在git文件夹中使用git-bash,如果我只是切换到位于bin中的bash,则一切正常.这就是为什么VSCode可以工作的原因(我已经设置它可以使用那个代码了)

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)

推荐答案

这也是我一段时间了

Ctrl-C 不会终止进程或停止在 GitBash

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

然后我意识到我像往常一样按 Ctrl-C ,但

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

GitBash

需要花费更多时间来终止进程

it takes more time to kill the process

因此,请按 Ctrl-C 1或1.5甚至2秒

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

在我的情况下有效的

我希望这也对您有用

供您参考.

我当前的版本是:Git 2.16

My Current Version is: Git 2.16

更新

不更新版本也会发生

我刚刚对其进行了更新,并且效果很好

I just updated it and it working fine

我当前的版本是:Git 2.18

My Current Version is: Git 2.18

这篇关于Ctrl-c不使用Git Bash停止Tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆