浏览代码

AMBARI-8333. Ambari-agent restart fails on Ubuntu. (dlysnichenko)

Lisnichenko Dmitro 10 年之前
父节点
当前提交
0258926049
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      ambari-agent/src/main/python/ambari_agent/PackagesAnalyzer.py

+ 1 - 1
ambari-agent/src/main/python/ambari_agent/PackagesAnalyzer.py

@@ -40,7 +40,7 @@ class PackagesAnalyzer:
 
   def launch_subprocess(self, command):
     isShell = not isinstance(command, (list, tuple))
-    return subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=isShell)
+    return subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=isShell, close_fds=True)
 
   def watchdog_func(self, command):
     self.event.wait(self.TIMEOUT_SECONDS)