changeset 21763:212783dc8c9a stable

Fix popen2 error on Windows when child writes to stderr (bug #43036) * lo-sysdep.cc (octave::sys::popen2): Ensure child inherits handle to the current stderr stream.
author Mike Miller <mtmiller@octave.org>
date Fri, 20 May 2016 11:53:15 -0700
parents 3c09cff7fa06
children 3f0a6bf25406 f00204dae6ee
files liboctave/system/lo-sysdep.cc
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/system/lo-sysdep.cc	Sat May 14 09:19:04 2016 -0700
+++ b/liboctave/system/lo-sysdep.cc	Fri May 20 11:53:15 2016 -0700
@@ -127,6 +127,7 @@
   si.dwFlags |= STARTF_USESTDHANDLES;
   si.hStdInput = childRead;
   si.hStdOutput = childWrite;
+  si.hStdError = GetStdHandle (STD_ERROR_HANDLE);
 
   // Ignore first arg as it is the command
   for (int k=1; k<args.length (); k++)