Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Open3 doesn't work in a sub-routine

by ig (Vicar)
on Jul 05, 2012 at 09:49 UTC ( #980005=note: print w/ replies, xml ) Need Help??


in reply to Open3 doesn't work in a sub-routine

It may not be an issue for the cases you are dealing with, but what if the command you run produces enough output to STDERR to fill the pipe before it closes STDOUT, and blocks writing STDERR. Then you will be stuck in the loop on STDOUT, waiting for that to finish, never reading STDERR, and the command will never finish because it is waiting to write to STDERR - deadlock.

You might have a look at select.


Comment on Re: Open3 doesn't work in a sub-routine
Re^2: Open3 doesn't work in a sub-routine
by Anonymous Monk on Jul 05, 2012 at 10:01 UTC
    Or if you're just interested in capturing the stuff, IPC::Run3

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2014-07-22 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (127 votes), past polls