在 os x 上停止 hg 服务
如何在 OS X(服务器 10.6)中停止 hg 服务?
我从终端启动它,而不是以守护进程模式启动它。它工作得很好,然后我想做一些改变,所以我按 ctrl-Z 来停止它。当我尝试再次启动它时,它说...
abort: cannot start server at ':8000': Address already in use
我假设该进程已经在运行并且尚未释放端口。但在活动监视器中,我找不到要杀死的“服务”或“hg”或“mercurial”进程。
帮助?
How do I stop hg serve in OS X (server 10.6)?
I started it from the terminal not in daemon mode. It worked fine, then I wanted to make some changes, so I did ctrl-Z to stop it. When I tried to start it again, it says...
abort: cannot start server at ':8000': Address already in use
I assume the process is already running and hasn't let go of the port. But in the activity monitor I can't find and "serve" or "hg" or "mercurial" processes to kill.
Help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
执行以下操作找出进程 ID:
终止进程
下次使用 Ctrl-C 停止服务器。 :)
Do the following to find out the process id:
Kill the process
Next time use Ctrl-C to stop the server. :)
Ctrl-Z
暂时停止进程。如果您使用Ctrl-Z
停止某些操作,您可以通过运行fg
再次启动它,让它再次接管终端,或者运行bg
来重新启动它。让它在终端后台运行。否则,您可以使用 pyfunc 的答案来终止服务器。当然,您可以通过在浏览器中打开 localhost:8000 来判断服务器是否仍在工作。Ctrl-Z
stops a process temporarily. If you stop something withCtrl-Z
, you can start it again by runningfg
to have it take over the terminal again, orbg
to have it running in the background of the terminal. Otherwise, you can kill the server using pyfunc's answer. You can tell if the server is still working by opening uplocalhost:8000
in your browser, of course.检查 hg 服务器的监听端口通常为 8000
检查 hg 的 PID 搜索 hg,然后搜索 python
现在杀死你找到的 PID
Check for the listening port typically 8000 for hg server
Check the PID for hg search for hg and then python
Now kill the PID you found