Thi version does not change error behavior and output variables of popen2.
Michael.
> Yes, well looking at popen2 and pipe that it call I think they are in > serious need of a rewrite in any case. They both still use deprecated > list objects rather than cell arrays. That being the case probably > option 2 is probably the best.
Here's another variant, which moves popen2 into C++ and provides Win32 implementation. Note that the UNIX version is not tested *at all* (I don't even know if it compiles): I just tried to convert popen2.m in C++, but it probably needs fixing.