Browse Source

Fix bug with checking if process is still alive

 "tuple in tuple" doesn't ever work
Hamilton Turner 10 years ago
parent
commit
c4d5886c9c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      toolset/benchmark/benchmarker.py

+ 1 - 0
toolset/benchmark/benchmarker.py

@@ -719,6 +719,7 @@ class Benchmarker:
             # Check that PID again
             # Check that PID again
             ps = subprocess.Popen(['ps','p',pid], stdout=subprocess.PIPE)
             ps = subprocess.Popen(['ps','p',pid], stdout=subprocess.PIPE)
             (out_9, err_9) = ps.communicate()
             (out_9, err_9) = ps.communicate()
+            if len(out_9.splitlines()) != 1:  # One line for the header row
               os.kill(int(pid), 9)
               os.kill(int(pid), 9)
           except OSError:
           except OSError:
             out.write( textwrap.dedent("""
             out.write( textwrap.dedent("""