|
a/src/windows/execmd_w.cpp |
|
b/src/windows/execmd_w.cpp |
|
... |
|
... |
762 |
// This structure specifies the STDIN and STDOUT handles for redirection.
|
762 |
// This structure specifies the STDIN and STDOUT handles for redirection.
|
763 |
ZeroMemory(&siStartInfo, sizeof(STARTUPINFO));
|
763 |
ZeroMemory(&siStartInfo, sizeof(STARTUPINFO));
|
764 |
siStartInfo.cb = sizeof(STARTUPINFO);
|
764 |
siStartInfo.cb = sizeof(STARTUPINFO);
|
765 |
if (m->m_flags & EXF_SHOWWINDOW) {
|
765 |
if (m->m_flags & EXF_SHOWWINDOW) {
|
766 |
siStartInfo.dwFlags |= STARTF_USESTDHANDLES;
|
766 |
siStartInfo.dwFlags |= STARTF_USESTDHANDLES;
|
|
|
767 |
if (m->m_flags & EXF_MAXIMIZED) {
|
|
|
768 |
siStartInfo.dwFlags |= STARTF_USESHOWWINDOW;
|
|
|
769 |
siStartInfo.wShowWindow = SW_SHOWMAXIMIZED;
|
|
|
770 |
}
|
767 |
} else {
|
771 |
} else {
|
768 |
siStartInfo.dwFlags |= STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
|
772 |
siStartInfo.dwFlags |= STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
|
|
|
773 |
// This is to hide the console when starting a cmd line command from
|
|
|
774 |
// the GUI. Also note STARTF_USESHOWWINDOW above
|
|
|
775 |
siStartInfo.wShowWindow = SW_HIDE;
|
769 |
}
|
776 |
}
|
770 |
siStartInfo.hStdOutput = hOutputWrite;
|
777 |
siStartInfo.hStdOutput = hOutputWrite;
|
771 |
siStartInfo.hStdInput = hInputRead;
|
778 |
siStartInfo.hStdInput = hInputRead;
|
772 |
siStartInfo.hStdError = hErrorWrite;
|
779 |
siStartInfo.hStdError = hErrorWrite;
|
773 |
// This is to hide the console when starting a cmd line command from
|
|
|
774 |
// the GUI. Also note STARTF_USESHOWWINDOW above
|
|
|
775 |
siStartInfo.wShowWindow = SW_HIDE;
|
|
|
776 |
|
780 |
|
777 |
char *envir = mergeEnvironment(m->m_env);
|
781 |
char *envir = mergeEnvironment(m->m_env);
|
778 |
|
782 |
|
779 |
// Create the child process.
|
783 |
// Create the child process.
|
780 |
// Need a writable buffer for the command line, for some reason.
|
784 |
// Need a writable buffer for the command line, for some reason.
|