From: Adrian McCarthy Date: Fri, 29 May 2015 23:01:25 +0000 (+0000) Subject: Fix inferior's i/o connections to its console window on Windows 7. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1adc7bc3a00614aab14fbaec0361375a73d7100;p=platform%2Fupstream%2Fllvm.git Fix inferior's i/o connections to its console window on Windows 7. llvm-svn: 238629 --- diff --git a/lldb/source/Host/windows/ProcessLauncherWindows.cpp b/lldb/source/Host/windows/ProcessLauncherWindows.cpp index d498eea..a09906d 100644 --- a/lldb/source/Host/windows/ProcessLauncherWindows.cpp +++ b/lldb/source/Host/windows/ProcessLauncherWindows.cpp @@ -34,9 +34,9 @@ ProcessLauncherWindows::LaunchProcess(const ProcessLaunchInfo &launch_info, Erro startupinfo.cb = sizeof(startupinfo); startupinfo.dwFlags |= STARTF_USESTDHANDLES; - startupinfo.hStdError = stderr_handle; - startupinfo.hStdInput = stdin_handle; - startupinfo.hStdOutput = stdout_handle; + startupinfo.hStdError = stderr_handle ? stderr_handle : ::GetStdHandle(STD_ERROR_HANDLE); + startupinfo.hStdInput = stdin_handle ? stdin_handle : ::GetStdHandle(STD_INPUT_HANDLE); + startupinfo.hStdOutput = stdout_handle ? stdout_handle : ::GetStdHandle(STD_OUTPUT_HANDLE); const char *hide_console_var = getenv("LLDB_LAUNCH_INFERIORS_WITHOUT_CONSOLE"); if (hide_console_var && llvm::StringRef(hide_console_var).equals_lower("true"))