什么是Play Framework 2.1的“播放停止"功能?
Play 2.1的play stop
等于什么?
What is the equivalent of play stop
for Play 2.1?
如果我做了play start
,如何彻底终止该过程?
If I did play start
, how do I cleanly terminate the process?
如文档中所述 :
运行start命令时,Play会派生一个新的JVM并运行默认的Netty HTTP服务器.标准输出流将重定向到Play控制台,因此您可以监视其状态.
When you run the start command, Play forks a new JVM and runs the default Netty HTTP server. The standard output stream is redirected to the Play console, so you can monitor its status.
服务器的进程ID显示在引导程序中,并写入RUNNING_PID文件.要杀死正在运行的Play服务器,只需将SIGTERM发送到该进程即可正确关闭该应用程序.
The server’s process id is displayed at bootstrap and written to the RUNNING_PID file. To kill a running Play server, it is enough to send a SIGTERM to the process to properly shutdown the application.
如果键入Ctrl + D,将退出Play控制台,但是创建的服务器进程将继续在后台运行.然后关闭派生的JVM的标准输出流,并可以从logs/application.log文件中读取日志.
If you type Ctrl+D, the Play console will quit, but the created server process will continue running in background. The forked JVM’s standard output stream is then closed, and logging can be read from the logs/application.log file.
所以我认为您必须使用play run
而不是play start
.然后,您将可以使用 Ctrl + D 停止播放.
So I think that you have to use play run
instead of play start
. Then you'll be able to use Ctrl+D to stop play.