summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/process_util_win.cc4
-rw-r--r--chrome/app/chrome_dll_main.cc22
-rw-r--r--sandbox/src/target_process.cc5
3 files changed, 1 insertions, 30 deletions
diff --git a/base/process_util_win.cc b/base/process_util_win.cc
index 8738b9a..c5d7790 100644
--- a/base/process_util_win.cc
+++ b/base/process_util_win.cc
@@ -196,10 +196,8 @@ bool LaunchAppImpl(const std::wstring& cmdline,
ProcessHandle* process_handle) {
STARTUPINFO startup_info = {0};
startup_info.cb = sizeof(startup_info);
- startup_info.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
+ startup_info.dwFlags = STARTF_USESHOWWINDOW;
startup_info.wShowWindow = start_hidden ? SW_HIDE : SW_SHOW;
- startup_info.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
- startup_info.hStdError = GetStdHandle(STD_ERROR_HANDLE);
PROCESS_INFORMATION process_info;
if (!CreateProcess(NULL,
const_cast<wchar_t*>(cmdline.c_str()), NULL, NULL,
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 7100464e..c08e109 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -13,11 +13,8 @@
#include <algorithm>
#include <atlbase.h>
#include <atlapp.h>
-#include <fcntl.h>
-#include <io.h>
#include <malloc.h>
#include <new.h>
-#include <process.h>
#elif defined(OS_POSIX)
#include <locale.h>
#include <signal.h>
@@ -322,19 +319,6 @@ void RegisterInvalidParamHandler() {
#endif
}
-#if defined(OS_WIN)
-void SetupStdHandle(DWORD name, int target_fd, FILE* target_fp) {
- HANDLE handle = GetStdHandle(name);
- if (handle && handle != INVALID_HANDLE_VALUE) {
- int fd = _open_osfhandle(reinterpret_cast<intptr_t>(handle), _O_TEXT);
- if (fd != -1) {
- _dup2(fd, target_fd);
- target_fp->_file = target_fd;
- }
- }
-}
-#endif
-
void SetupCRT(const CommandLine& parsed_command_line) {
#if defined(OS_WIN)
#ifdef _CRTDBG_MAP_ALLOC
@@ -357,12 +341,6 @@ void SetupCRT(const CommandLine& parsed_command_line) {
HeapSetInformation(crt_heap, HeapCompatibilityInformation,
&enable_lfh, sizeof(enable_lfh));
}
-
- // Attach to an existing console if one exists, and connect up the CRT
- // handles for stdout/stderr.
- AttachConsole(ATTACH_PARENT_PROCESS);
- SetupStdHandle(STD_OUTPUT_HANDLE, 1, stdout);
- SetupStdHandle(STD_ERROR_HANDLE, 2, stderr);
#endif
}
diff --git a/sandbox/src/target_process.cc b/sandbox/src/target_process.cc
index f0a40bd..a9848c5 100644
--- a/sandbox/src/target_process.cc
+++ b/sandbox/src/target_process.cc
@@ -136,11 +136,6 @@ DWORD TargetProcess::Create(const wchar_t* exe_path,
startup_info.lpDesktop = desktop_name.get();
}
- // Hook up stdout/stderr.
- startup_info.dwFlags = STARTF_USESTDHANDLES;
- startup_info.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
- startup_info.hStdError = GetStdHandle(STD_ERROR_HANDLE);
-
PROCESS_INFORMATION process_info = {0};
if (!::CreateProcessAsUserW(lockdown_token_,