t-road

参考:https://blog.csdn.net/zj360202/article/details/78894512

nohup python test.py &

nohup python test.py 2>&1 &

nohup python test.py > test.out 2>&1 &

上面三种方式无论在nohup.out 或test.out都看不到数据结果,这是因为python执行有缓存输出。

 

解决:使用-u参数

nohup python -u test.py > test.out 2>&1 &

 

分类:

技术点:

相关文章:

  • 2021-09-12
  • 2021-09-12
  • 2021-07-25
  • 2021-08-28
  • 2022-01-20
  • 2021-09-08
  • 2022-12-23
  • 2021-09-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2022-02-07
  • 2022-12-23
相关资源
相似解决方案