in reply to Re^2: open3 and IO::Select
in thread open3 and IO::Select
I realise I come very late in this exchange, but just in case people are still looking for answers, I got it to work with cygwin perl on Windows XP with the following tweaks :
1/2/use IO::Select; use IO::Socket; use IO::Handle; use IPC::Open3;
3/$Pin = new IO::Handle; $Pin->fdopen(10, "w"); $Pout = new IO::Handle; $Pout->fdopen(11, "r"); $Perr = new IO::Handle; $Perr->fdopen(12, "r"); $Proc = open3($Pin, $Pout, $Perr, $cmdline);
$select->add($Pin); $select->add($Pout); $select->add($Perr);
For $cmdline I used bash, to test things by hand (with STDIN added to my select and printing on $Pin what I get on my perl process' stdin).
It works beautifully.
|
|---|
| Replies are listed 'Best First'. |
|---|