Skip to content

Commit

Permalink
Revert "mingw: work around incorrect standard handles"
Browse files Browse the repository at this point in the history
Let's try this differently.

This reverts commit 868c7ce.
  • Loading branch information
dscho committed Feb 7, 2018
1 parent 868c7ce commit fdd80a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,12 +1662,12 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
si.StartupInfo.hStdError = winansi_get_osfhandle(fherr);

/* The list of handles cannot contain duplicates */
if ((intptr_t)si.StartupInfo.hStdInput >= 0)
if (si.StartupInfo.hStdInput != INVALID_HANDLE_VALUE)
stdhandles[stdhandles_count++] = si.StartupInfo.hStdInput;
if ((intptr_t)si.StartupInfo.hStdOutput >= 0 &&
if (si.StartupInfo.hStdOutput != INVALID_HANDLE_VALUE &&
si.StartupInfo.hStdOutput != si.StartupInfo.hStdInput)
stdhandles[stdhandles_count++] = si.StartupInfo.hStdOutput;
if ((intptr_t)si.StartupInfo.hStdError >= 0 &&
if (si.StartupInfo.hStdError != INVALID_HANDLE_VALUE &&
si.StartupInfo.hStdError != si.StartupInfo.hStdInput &&
si.StartupInfo.hStdError != si.StartupInfo.hStdOutput)
stdhandles[stdhandles_count++] = si.StartupInfo.hStdError;
Expand Down

0 comments on commit fdd80a8

Please sign in to comment.