Index: tools/telemetry/telemetry/core/platform/power_monitor/monsoon_power_monitor.py |
diff --git a/tools/telemetry/telemetry/core/platform/power_monitor/monsoon_power_monitor.py b/tools/telemetry/telemetry/core/platform/power_monitor/monsoon_power_monitor.py |
index b2bf0fdf20eeedce91773264f47c34351c28baef..60df542a8baf356cc344efafec892831d1d3971a 100644 |
--- a/tools/telemetry/telemetry/core/platform/power_monitor/monsoon_power_monitor.py |
+++ b/tools/telemetry/telemetry/core/platform/power_monitor/monsoon_power_monitor.py |
@@ -73,6 +73,8 @@ class MonsoonPowerMonitor(sysfs_power_monitor.SysfsPowerMonitor): |
args=(self._monsoon, |
self._is_collecting, |
self._powermonitor_output_file)) |
+ # Ensure child is not left behind: parent kills daemonic children on exit. |
+ self._powermonitor_process.daemon = True |
self._powermonitor_process.start() |
if not self._is_collecting.wait(timeout=0.5): |
self._powermonitor_process.terminate() |