Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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

Replies are listed 'Best First'.
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2016-12-09 14:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (152 votes). Check out past polls.