Mercurial > hg > truffle
comparison mxtool/mx.py @ 15845:babe4565c371
mx: fixed incorrect test for subprocess being alive
author | twisti |
---|---|
date | Thu, 22 May 2014 12:41:53 +0200 |
parents | 9acad98567dc |
children | dba1a510fe92 |
comparison
equal
deleted
inserted
replaced
15844:d1822a8fe26f | 15845:babe4565c371 |
---|---|
1845 if _opts.killwithsigquit: | 1845 if _opts.killwithsigquit: |
1846 _send_sigquit() | 1846 _send_sigquit() |
1847 | 1847 |
1848 def is_alive(p): | 1848 def is_alive(p): |
1849 if isinstance(p, subprocess.Popen): | 1849 if isinstance(p, subprocess.Popen): |
1850 return p.poll() is not None | 1850 return p.poll() is None |
1851 assert isinstance(p, multiprocessing.Process), p | 1851 assert isinstance(p, multiprocessing.Process), p |
1852 return p.is_alive() | 1852 return p.is_alive() |
1853 | 1853 |
1854 for p, args in _currentSubprocesses: | 1854 for p, args in _currentSubprocesses: |
1855 if is_alive(p): | 1855 if is_alive(p): |