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

Optimize subprocess performance with close_fds=False

This commit is contained in:
J. Nick Koston
2025-08-08 16:18:04 -05:00
parent ff9ddb9d68
commit 3ded96bb26
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