Nohup
1. 后台运行¶
Bash
nohup python main_concurrent.py > /dev/null 2>&1 &
或者
nohup python main_concurrent.py > myearning.out 2>&1 &
2. 退出程序¶
- 查找进程 PID(推荐先查看确认):
- 发送终止信号(优雅退出):
- 如果进程没有响应,再强制终止:
- 也可直接按匹配名一次性终止(小心,可能匹配到多个进程):
- 确认进程已停止