【发布时间】:2014-08-12 17:24:13
【问题描述】:
根据FAQ,从推荐的运行分离进程的方法中,唯一适合我的是screen,因为我无法在服务器上安装程序并且似乎无法使nohup 工作。我想:
- run(command) 以便命令继续运行而不会阻塞。
- 知道我正在运行的进程的 pid,以便我以后可以杀死它。
到目前为止,没有任何 nohup 重定向和 screen -md command 的组合对我有用。
特别是,当直接在服务器上执行而不是通过fabric 的运行功能时,运行此命令行确实有效。我相信当函数返回时该进程已关闭,我没有时间查看它:
nohup /opt/logstash/bin/logstash agent -f /home/unicryo/PVSS_projects/GenerateErrors/logstash_conf/logstash-config-minimum.cfg >> test.out 2>&1 &
【问题讨论】:
-
使用 nohup 有什么错误?