Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: get stdout stderr

by kennethk (Abbot)
on Oct 16, 2012 at 20:20 UTC ( #999419=note: print w/replies, xml ) Need Help??

in reply to get stdout stderr

I don't know if this is directly related to your issue and I've never worked with IO::CaptureOutput, but I've had difficulty shelling out in the past while capturing output to scalars. Detailed in STDOUT redirects and IPC::Open3, essentially the fileno of my output handles no longer corresponded to 0,1 and 2, and so the linking was lost on system call. The only solution I've found, assuming this is your issue, is rolling my own system call wrapper with pipe and fork, like in Re: How to capture child process output and divert to log4perl. In some cases, depending on some particulars, I've had to explicitly open unused filehandles to hold onto the right filenos until I needed them -- the system doles out filenos by the lowest one available.

Or all this could be off base for your case.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999419]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-03-25 17:59 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (311 votes). Check out past polls.