1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 11:52:20 +01:00

Optimize subprocess performance with close_fds=False (#10145)

This commit is contained in:
J. Nick Koston
2025-08-10 16:14:13 -05:00
committed by GitHub
parent 279f56141e
commit 5a8f722316
12 changed files with 40 additions and 13 deletions

View File

@@ -105,6 +105,7 @@ logger:
check=True,
cwd=init_dir,
env=env,
close_fds=False,
)
# Lock is held until here, ensuring cache is fully populated before any test proceeds
@@ -245,6 +246,7 @@ async def compile_esphome(
# Start in a new process group to isolate signal handling
start_new_session=True,
env=env,
close_fds=False,
)
await proc.wait()
@@ -477,6 +479,7 @@ async def run_binary_and_wait_for_port(
# Start in a new process group to isolate signal handling
start_new_session=True,
pass_fds=(device_fd,),
close_fds=False,
)
# Close the device end in the parent process