Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://980005]
[karlgoethebier]: silence after a post is the worst punishment ;-)
[karlgoethebier]: i guess i've been ikegamid, he

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2017-11-23 17:10 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (336 votes). Check out past polls.