Home  >  Article  >  php教程  >  php守护进程被kill的解决方案

php守护进程被kill的解决方案

WBOY
WBOYOriginal
2016-06-06 19:54:121975browse

有一个队列服务需要使用php作守护进程,但发现这个守护进程经常被杀掉,查了资料,发现了如下的描述 http://blog.csdn.net/newjueqi/article/details/8504325 他是在当shell中提示了nohup成功后还需要按终端上键盘任意键退回到shell输入命令窗口,然后通过在

有一个队列服务需要使用php作守护进程,但发现这个守护进程经常被杀掉,查了资料,发现了如下的描述


http://blog.csdn.net/newjueqi/article/details/8504325


他是在当shell中提示了nohup成功后还需要按终端上键盘任意键退回到shell输入命令窗口,然后通过在shell中输入exit来退出终端;而我是每次在nohup执行成功后直接点关闭程序按钮关闭终端.。所以这时候会断掉该命令所对应的session,导致nohup对应的进程被通知需要一起shutdown。


只有按照这个操作,才能正确运行守护进程


[文章作者]曾健生

[作者邮箱]zengjiansheng1@126.com

[作者QQ]190678908

[博客]  http://blog.csdn.net/newjueqi

http://blog.sina.com.cn/h6k65


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn