From fb2bfa8d9f9f462d65a2cc1e7dd4983d9dbef80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Petter=20Sk=C3=A5lerud?= Date: Wed, 30 Sep 2026 10:58:20 +0200 Subject: [PATCH] install-ffmpeg-common.ps1: Wait only for Bash process to finish When building FFmpeg for MSVC, the toolchain may boot up other processes for telemetry. These processes are long-running and outlive the actual compilation. When we run MSYS with -Wait, we end up stalling until all sub-processes shut down. This was observed when running this script locally for MSVC, and caused compilation to freeze. This patch makes us only wait for the Bash process spawned by MSYS to finish. Pick-to: 6.12 Change-Id: Iff89db8e7d3785713e1124b6169cd8a1230eefbc Reviewed-by: Artem Dyomin --- coin/provisioning/common/windows/install-ffmpeg-common.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coin/provisioning/common/windows/install-ffmpeg-common.ps1 b/coin/provisioning/common/windows/install-ffmpeg-common.ps1 index 4069c2af..7d2d44f4 100644 --- a/coin/provisioning/common/windows/install-ffmpeg-common.ps1 +++ b/coin/provisioning/common/windows/install-ffmpeg-common.ps1 @@ -123,7 +123,12 @@ function InstallFfmpeg { Write-Host "MSYS cmd:" Write-Host $cmd - $buildResult = Start-Process -NoNewWindow -Wait -PassThru -ErrorAction Stop -FilePath "$bash" -ArgumentList ("-lc", "`"$cmd`"") + # Don't use Start-Process -Wait. It waits for the whole process tree, which hangs when + # MSVC leaves detached helpers behind (e.g. vctip.exe). Wait for bash itself instead. + $buildResult = Start-Process -NoNewWindow -PassThru -ErrorAction Stop -FilePath "$bash" -ArgumentList ("-lc", "`"$cmd`"") + # Cache the process handle so ExitCode stays available after the process exits + $null = $buildResult.Handle + $buildResult.WaitForExit() $env:PATH = $oldPath