Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: IPC::Open3 woes

by polesworth (Initiate)
on Oct 09, 2003 at 14:01 UTC ( #297915=note: print w/ replies, xml ) Need Help??


in reply to Re: IPC::Open3 woes
in thread IPC::Open3 woes

Hi,

I've been trying your example, and it works great on linux (perl 5.6.1), but doesn't work on win2k (activestate perl 5.8.0). I've managed to track it down as far as the line where you call can_read, which for some odd reason appears to cause the loop to exit immediately (probably returning undef). Calling count() immediately before the can_read shows that there are still 2 file handles.

I'm a bit stuck on this one, so if anyone has any ideas, they'd be appreciated.

Thanks.

Miah.


Comment on Re: IPC::Open3 woes
Re^2: IPC::Open3 woes
by Anonymous Monk on Sep 08, 2004 at 05:50 UTC
    Hi, I am new to open3 and perldoc is too vague to understand
    I am trying a simple unix command to run in open3.
    open3($stdin, $stdout, $stderr, "gcp -vpfR $xrc $dst")


    What i need is -- I want to caputre STDOUT until gcp finishes or there is something on STDERR (on disk full case etc).

    while (<$stdout>) {
    print "$_";
    }
    @stderr = <$stderr>;
    if (@stderr) { dir "ERROR: gcp\n" }


    BUT this is not working -- any suggestions

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://297915]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2014-09-02 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (21 votes), past polls