运行命令在后台使用cygwin从Windows cmd [英] Running command in background using cygwin from Windows cmd

查看:2523
本文介绍了运行命令在后台使用cygwin从Windows cmd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用cygwin从我的Windows命令行,我总是做的一切都很愉快,除非能够在后台运行一些东西(即在& 的命令)。



只是为了给你更多的上下文,我想能够启动一个Mercurial Web服务器,仍然能够继续使用命令行窗口,甚至关闭它,而不杀死服务器。例如:

 > hg serve& 
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 a help start for more info

Alternatively and for my case

hg serve --daemon

or

hg serve -d

will do the trick

这篇关于运行命令在后台使用cygwin从Windows cmd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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