aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--butl/process.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/butl/process.cxx b/butl/process.cxx
index 4b834fb..588c0b6 100644
--- a/butl/process.cxx
+++ b/butl/process.cxx
@@ -524,15 +524,15 @@ namespace butl
// Perform standard stream redirection if requested.
//
- if (si.hStdError == GetStdHandle (STD_OUTPUT_HANDLE))
+ if (err == STDOUT_FILENO)
si.hStdError = si.hStdOutput;
- else if (si.hStdOutput == GetStdHandle (STD_ERROR_HANDLE))
+ else if (out == STDERR_FILENO)
si.hStdOutput = si.hStdError;
- if (si.hStdError == GetStdHandle (STD_INPUT_HANDLE) ||
- si.hStdOutput == GetStdHandle (STD_INPUT_HANDLE) ||
- si.hStdInput == GetStdHandle (STD_OUTPUT_HANDLE) ||
- si.hStdInput == GetStdHandle (STD_ERROR_HANDLE))
+ if (err == STDIN_FILENO ||
+ out == STDIN_FILENO ||
+ in == STDOUT_FILENO ||
+ in == STDERR_FILENO)
fail ("invalid file descriptor");
if (!CreateProcess (