Merge pull request #1480 from dorssel/fix_ctrl_c

Fix Ctrl+C for WSL-side processes
This commit is contained in:
Frans van Dorsselaer authored and GitHub committed 2026-09-19 12:54:27 +02:00
commit 9062564fd7
1 file changed
+3
+3
View File
@@ -97,6 +97,9 @@ static partial class Wsl
_ = startInfo.Environment.Remove("WSL_UTF8");
if (linux is not null)
{
// This ensures that Ctrl+C is handled by our parent process only and is not hijacked by wsl.exe.
startInfo.CreateNewProcessGroup = true;
startInfo.CreateNoWindow = true;
startInfo.ArgumentList.Add("--distribution");
startInfo.ArgumentList.Add(linux.Value.distribution);
startInfo.ArgumentList.Add("--user");