MCPcopy Create free account
hub / github.com/FastLED/FastLED / _kill_docker_desktop_windows

Function _kill_docker_desktop_windows

ci/util/docker_helper.py:163–192  ·  view source on GitHub ↗

Kill Docker Desktop processes on Windows. Returns: True if processes were killed successfully, False otherwise

()

Source from the content-addressed store, hash-verified

161
162
163def _kill_docker_desktop_windows() -> bool:
164 """Kill Docker Desktop processes on Windows.
165
166 Returns:
167 True if processes were killed successfully, False otherwise
168 """
169 try:
170 # Kill Docker Desktop processes
171 subprocess.run(
172 ["taskkill", "/F", "/IM", "Docker Desktop.exe"],
173 capture_output=True,
174 timeout=10,
175 )
176
177 # Also kill the com.docker.backend process
178 subprocess.run(
179 ["taskkill", "/F", "/IM", "com.docker.backend.exe"],
180 capture_output=True,
181 timeout=10,
182 )
183
184 # Give processes time to terminate
185 time.sleep(3)
186 return True
187
188 except KeyboardInterrupt as ki:
189 handle_keyboard_interrupt(ki)
190 raise
191 except Exception:
192 return False
193
194
195def _restart_docker_desktop_windows() -> tuple[bool, str]:

Callers 1

Calls 2

runMethod · 0.45

Tested by

no test coverage detected