OK, here's an updated version: - move popen2 code into lo-sysdep.cc => octave_popen2 - keep popen2 interface in octave_syscalls class - modify pipe interface to separate read/write ends of the pipe
While doing this, I realized that the POSIX implementation of popen2 relies on members of octave_syscalls, so I had to cross-include lo-sysdep.h and oct-syscalls.h, because I move the entire implementation in lo-sysdep.cc. Another possibility would be to keep the POSIX implementation in oct-syscalls.cc and put only the other impl in lo-sysdep.cc. Which one is better?