我在Python脚本和独立的脚本中有一个while循环,所以我不能把它作为守护进程来运行。
此外,我尝试使用nohup,但我有这个错误:
root@ubuntu:~/Desktop/starthere-group-ok# nohup python yApp.py & [1] 3038 root@ubuntu:~/Desktop/starthere-group-ok# nohup: ignoring input and appending output to `nohup.out'
nohup.out:
1) Deployment 2) Service Status 3) List Servers 4) Restart Service 5) Restart Server 6) Execute Commands on Servers Seçiminizi yapın: Traceback (most recent call last): File "yApp.py", line 13, in <module> selection = raw_input("Seçiminizi yapın: ") IOError: [Errno 9] Bad file descriptor
我的脚本是一种工作,我的意思是部署。 有时需要几个小时,我不能离开PuTTy。
Seçiminizi yapın: Means "Make your selection" in Turkish.
也许这就是为什么我有这个错误? 我在用着;
#!/usr/bin/env python # -*- coding: utf-8 -*-
Metas在一开始。
所以我该怎么做?
提前致谢。