浏览代码

Merge pull request #1187 from TechEmpower/fixNuke

Trying to fix the nuke from orbit
Mike Smith 11 年之前
父节点
当前提交
5cb35ed89c
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      toolset/benchmark/benchmarker.py

+ 7 - 0
toolset/benchmark/benchmarker.py

@@ -701,6 +701,13 @@ class Benchmarker:
           continue
           continue
 
 
         if port > 6000:
         if port > 6000:
+          try:
+            # Never try to kill pid 0; bad form old chap.
+            if int(pid) == 0:
+              continue
+          except Exception:
+            # Trying to kill a non-number? Silly.
+            continue
           ps = subprocess.Popen(['ps','p',pid], stdout=subprocess.PIPE)
           ps = subprocess.Popen(['ps','p',pid], stdout=subprocess.PIPE)
           (out_6000, err_6000) = ps.communicate()
           (out_6000, err_6000) = ps.communicate()
           err.write(textwrap.dedent(
           err.write(textwrap.dedent(