mirror of
https://github.com/home-assistant/core.git
synced 2025-06-17 11:37:05 +00:00
13 lines
249 B
Python
13 lines
249 B
Python
"""Util to handle processes."""
|
|
|
|
import subprocess
|
|
|
|
|
|
def kill_subprocess(process: subprocess.Popen) -> None:
|
|
"""Force kill a subprocess and wait for it to exit."""
|
|
process.kill()
|
|
process.communicate()
|
|
process.wait()
|
|
|
|
del process
|