in reply to open3 and IO::Select

You can not do that on Windows using IPC::Open3 because select only works with sockets (and this is a OS limitation, not perl fault).

The alternative is to use named pipes (see Win32::Pipe) that have an API that allows to do non-blocking IO, but that API is incompatible with any other out there, so you will have to write your programs (both parent and children) specifically for it, and don't expect then to run on Unix/Linux later.

Another alternative is to open a socket pair as a TCP connection through the loopback interface (newer perl versions already implement socketpair this way). But on my experience, on Windows, not all applications like having their stdin/stdout/stderr redirected to a socket.

Replies are listed 'Best First'.
Re^2: open3 and IO::Select
by stephens2k (Novice) on Nov 20, 2007 at 15:46 UTC
    all,

    Thanks for the replies. I'm trying to use only modules that are in the default perl distribution because my sysops won't install anything else (thanks, guys). This is the 5.8.2 distribution on my AIX host.

    IPC::Run is not available in the 5.8.2 distribution.

    I've made it work be reading STDIN and STDERR in separate loops. Not elegant at all but it works on Windows. I expect I'll have to make changes when it is installed on AIX.

    Thanks, Bill