Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@52836 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Aug 30, 2010
1 parent 51d75e7 commit ee65bf4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gnuwin32/run.c
Expand Up @@ -292,8 +292,7 @@ static HANDLE getOutputHandle(const char *fout)
snprintf(RunError, 500,
"unable to redirect output to '%s'", fout);
return NULL;
}
return hOUT;
} else return hOUT;
}
return INVALID_HANDLE_VALUE;
}
Expand Down Expand Up @@ -353,6 +352,8 @@ int runcmd(const char *cmd, cetype_t enc, int wait, int visible,
int ret = 0;
PROCESS_INFORMATION pi;

if (!hOUT || !hERR) return 1;

memset(&pi, 0, sizeof(pi));
pcreate(cmd, enc, !wait, visible, hIN, hOUT, hERR, &pi);
if (!pi.hProcess) return NOLAUNCH;
Expand All @@ -369,7 +370,7 @@ int runcmd(const char *cmd, cetype_t enc, int wait, int visible,
} else ret = 0;
CloseHandle(pi.hProcess);
if (hIN != INVALID_HANDLE_VALUE) CloseHandle(hIN);
if (hOUT != INVALID_HANDLE_VALUE) CloseHandle(hERR);
if (hOUT != INVALID_HANDLE_VALUE) CloseHandle(hOUT);
if (hERR != INVALID_HANDLE_VALUE) CloseHandle(hERR);
return ret;
}
Expand Down

0 comments on commit ee65bf4

Please sign in to comment.