为什么 nohup 在 os.system 中的 python 脚本中不起作用?

时间:2021-01-19 01:38:20

标签: python nohup os.system

我尝试在集群上的 python 中使用 nohup 但失败了。我的代码如下:

import os

path = "/ldfssz1/SP_MSI/USER/"
os.system("nohup sh "+ path + "myjobs.sh &")

集群只返回这个:

nohup: ignoring input and appending output to `nohup.out'

没有 pid 返回并且作业命令没有返回任何内容。谁能给我一些想法这里发生了什么?非常感谢!

0 个答案:

没有答案