mirror of https://github.com/ArduPilot/ardupilot
Tools: autotest: fix process kill in sim_vehicle.py
This commit is contained in:
parent
7186e443ba
commit
ea2ec9e4a2
|
@ -196,9 +196,10 @@ def kill_tasks_psutil(victims):
|
|||
use this routine"""
|
||||
import psutil
|
||||
for proc in psutil.process_iter():
|
||||
if proc.status == psutil.STATUS_ZOMBIE:
|
||||
pdict = proc.as_dict(attrs=['name', 'status'])
|
||||
if pdict['status'] == psutil.STATUS_ZOMBIE:
|
||||
continue
|
||||
if proc.name in victims:
|
||||
if pdict['name'] in victims:
|
||||
proc.kill()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue