运行命令在后台使用cygwin从Windows cmd [英] Running command in background using cygwin from Windows cmd
问题描述
我使用cygwin从我的Windows命令行,我总是做的一切都很愉快,除非能够在后台运行一些东西(即在&
的命令)。
只是为了给你更多的上下文,我想能够启动一个Mercurial Web服务器,仍然能够继续使用命令行窗口,甚至关闭它,而不杀死服务器。例如:
> hg serve&
$ p
listen at http:// localhost:8000 /(绑定到*:8000)
> echo仍然能够做到这一点
解决方案找到解决方案:
p>
start< command> / B
a
帮助启动
了解更多信息
或者对于我的情况
hg serve --daemon
hg serve -d
b $ b会执行
I use cygwin from my Windows command line, I've always done everything quite happily except being able to run something in the background (i.e. putting
&
at the end of a command).Just to give you more context, I want to be able to start a Mercurial web server and still be able to keep using the command line window and even closing it without killing the server. For example:
>hg serve & listening at http://localhost:8000/ (bound to *:8000) >echo "Still able to do this"
Any workarounds to this?
解决方案Found the solution:
start <command> /B
start
is a windows command, do ahelp start
for more infoAlternatively and for my case
hg serve --daemon
or
hg serve -d
will do the trick
这篇关于运行命令在后台使用cygwin从Windows cmd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!