如何在Mac上退出ASP.NET Kestrel Web服务器(How to quit ASP.NET Kestrel web server on a Mac)

编程入门 行业动态 更新时间:2024-10-28 18:34:26
如何在Mac上退出ASP.NET Kestrel Web服务器(How to quit ASP.NET Kestrel web server on a Mac)

我在Mac上使用ASP.NET vNext K运行时运行了一个由Yeoman生成的简单MVC应用程序。 我可以从项目目录运行k kestrel ,一切启动并运行正常。 但是,当我按Ctrl + C(或我尝试过的任何其他组合键)时,服务器不会退出。 我必须关闭终端窗口才能使服务器关闭。 我失踪了什么

I'm running a simple MVC app generated by Yeoman on my Mac using the ASP.NET vNext K runtime. I can run k kestrel from the project directory, and everything boots up and runs just fine. However, when I hit Ctrl+C (or any other key combination I've tried), the server doesn't quit. I have to close the terminal window to get the server to shut down. What am I missing?

最满意答案

如果只是按Enter键不起作用,请在运行Kestrel的终端窗口中尝试以下操作:

按Ctrl + z暂停进程。 类型: kill %1 。

It turns out that simply hitting "Enter" exits kestrel cleanly, without the need to kill the mono-sgen process afterward. There is a github issue on the Kestrel repo asking to make this more obvious.

更多推荐

本文发布于:2023-08-06 11:15:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1448505.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:服务器   如何在   ASP   NET   Mac

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!