Skip to content

Conversation

@charles-zablit
Copy link
Contributor

This patch fixes a regression caused by #168729.

The changes ensure that we only create the process with a ConPTY if we need to.

@llvmbot
Copy link
Member

llvmbot commented Dec 18, 2025

@llvm/pr-subscribers-platform-windows

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

Changes

This patch fixes a regression caused by #168729.

The changes ensure that we only create the process with a ConPTY if we need to.


Full diff: https://github.com/llvm/llvm-project/pull/172877.diff

1 Files Affected:

  • (modified) lldb/source/Host/windows/ProcessLauncherWindows.cpp (+3-2)
diff --git a/lldb/source/Host/windows/ProcessLauncherWindows.cpp b/lldb/source/Host/windows/ProcessLauncherWindows.cpp
index ae79171337726..4cfe6f3394be9 100644
--- a/lldb/source/Host/windows/ProcessLauncherWindows.cpp
+++ b/lldb/source/Host/windows/ProcessLauncherWindows.cpp
@@ -93,8 +93,9 @@ ProcessLauncherWindows::LaunchProcess(const ProcessLaunchInfo &launch_info,
   startupinfoex.StartupInfo.dwFlags |= STARTF_USESTDHANDLES;
 
   HPCON hPC = launch_info.GetPTY().GetPseudoTerminalHandle();
-  bool use_pty =
-      hPC != INVALID_HANDLE_VALUE && launch_info.GetNumFileActions() == 0;
+  bool use_pty = hPC != INVALID_HANDLE_VALUE &&
+                 launch_info.GetNumFileActions() == 0 &&
+                 launch_info.GetFlags().Test(lldb::eLaunchFlagLaunchInTTY);
 
   HANDLE stdin_handle = GetStdioHandle(launch_info, STDIN_FILENO);
   HANDLE stdout_handle = GetStdioHandle(launch_info, STDOUT_FILENO);

@charles-zablit charles-zablit merged commit 78d291e into llvm:main Dec 18, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants