summaryrefslogtreecommitdiffstats
path: root/src/subprocess-win32.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/subprocess-win32.cc')
-rw-r--r--src/subprocess-win32.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/subprocess-win32.cc b/src/subprocess-win32.cc
index 2efec00..4649ee3 100644
--- a/src/subprocess-win32.cc
+++ b/src/subprocess-win32.cc
@@ -95,8 +95,10 @@ bool Subprocess::Start(struct SubprocessSet* set, const string& command) {
startup_info.cb = sizeof(STARTUPINFO);
startup_info.dwFlags = STARTF_USESTDHANDLES;
startup_info.hStdOutput = child_pipe;
+ // TODO: what does this hook up stdin to?
startup_info.hStdInput = NULL;
- startup_info.hStdError = NULL; // TODO: handle child stderr as well.
+ // TODO: is it ok to reuse pipe like this?
+ startup_info.hStdError = child_pipe;
PROCESS_INFORMATION process_info;
@@ -121,7 +123,7 @@ bool Subprocess::Start(struct SubprocessSet* set, const string& command) {
void Subprocess::OnPipeReady() {
DWORD bytes;
- if (!GetOverlappedResult(pipe_, &overlapped_, &bytes, FALSE)) {
+ if (!GetOverlappedResult(pipe_, &overlapped_, &bytes, TRUE)) {
if (GetLastError() == ERROR_BROKEN_PIPE) {
CloseHandle(pipe_);
pipe_ = NULL;