#6383 Capture process output when in foreground mode
This commit is contained in:
parent
026b1f0de1
commit
aca2605cb8
|
@ -357,12 +357,17 @@ MSWindowsWatchdog::startProcessInForeground(String& command)
|
||||||
// clear, as we're reusing process info struct
|
// clear, as we're reusing process info struct
|
||||||
ZeroMemory(&m_processInfo, sizeof(PROCESS_INFORMATION));
|
ZeroMemory(&m_processInfo, sizeof(PROCESS_INFORMATION));
|
||||||
|
|
||||||
STARTUPINFO startupInfo;
|
STARTUPINFO si;
|
||||||
ZeroMemory(&startupInfo, sizeof(STARTUPINFO));
|
ZeroMemory(&si, sizeof(STARTUPINFO));
|
||||||
|
si.cb = sizeof(STARTUPINFO);
|
||||||
|
si.lpDesktop = "winsta0\\Default"; // TODO: maybe this should be \winlogon if we have logonui.exe?
|
||||||
|
si.hStdError = m_stdOutWrite;
|
||||||
|
si.hStdOutput = m_stdOutWrite;
|
||||||
|
si.dwFlags |= STARTF_USESTDHANDLES;
|
||||||
|
|
||||||
return CreateProcess(
|
return CreateProcess(
|
||||||
NULL, LPSTR(command.c_str()), NULL, NULL,
|
NULL, LPSTR(command.c_str()), NULL, NULL,
|
||||||
FALSE, 0, NULL, NULL, &startupInfo, &m_processInfo);
|
TRUE, 0, NULL, NULL, &si, &m_processInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
|
|
Loading…
Reference in New Issue