bash Taskkill /PID 在 GitBash 中不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34981745/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Taskkill /PID not working in GitBash
提问by Min
I'm trying to kill a process on GitBash on Windows10 using the taskkill command. However, I get the following error:
我正在尝试使用 taskkill 命令在 Windows10 上终止 GitBash 上的进程。但是,我收到以下错误:
$ taskkill /pid 13588
ERROR: Invalid argument/option - 'C:/Program Files/Git/pid'.
Type "TASKKILL /?" for usage.
it works fine on cmd. Can anyone help?
它在 cmd 上运行良好。任何人都可以帮忙吗?
回答by gollum
You have to use double slashes in this case:
在这种情况下,您必须使用双斜线:
taskkill //PID 13588
This is documented here: http://www.mingw.org/wiki/Posix_path_conversion
Look at the examples on this page, especially the //foobar
example.
这在此处记录:http: //www.mingw.org/wiki/Posix_path_conversion
查看此页面上的示例,尤其是//foobar
示例。
回答by Alexee
Use TSKILL processid
用 TSKILL processid
Example:
例子:
TSKILL 1234
回答by realnikunj
To delete the child processes as well, use the "/T" argument.
要同时删除子进程,请使用“/T”参数。
taskkill //PID 13588 //T
taskkill //PID 13588 //T
use double slashes before argument.
在参数前使用双斜线。
回答by Lucas Moyano Angelini
To fix this I need to kill another additional program:
为了解决这个问题,我需要杀死另一个附加程序:
taskkill //F //IM "git-bash.exe"
taskkill //F //IM "bash.exe"