nohup
Python test.py > nohup.out 2>&1 &
發現nohup.out中顯示不出來python程序中print的東西。
這是因為python的輸出有緩沖,導致nohup.out並不能夠馬上看到輸出。
python 有個-u參數,使得python不啟用緩沖。
nohup python -u test.py > nohup.out 2>&1 &
發現nohup.out中顯示不出來python程序中print的東西。
這是因為python的輸出有緩沖,導致nohup.out並不能夠馬上看到輸出。
python 有個-u參數,使得python不啟用緩沖。
nohup python -u test.py > nohup.out 2>&1 &
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。