Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Details of filehandles

by setuk (Initiate)
on Oct 27, 2009 at 23:19 UTC ( #803540=perlquestion: print w/replies, xml ) Need Help??

setuk has asked for the wisdom of the Perl Monks concerning the following question:

I am using POE - and its great.

Using it to fork children and have them communicate back with the parent process using POE::Filter::Reference.

In some instances i note that when the children throw STDERR messages or STDOUT messages they arent getting back to POE.

I also note this is nothing to do with POE since when i write STDERR outside of the POE call i also dont see that sent back.

So now im theorising that STDERR and STDOUT have been directed elsewhere. Im sure this is simple but how do i tell where a certain filehandle is set to send its output??

Replies are listed 'Best First'.
Re: Details of filehandles
by Joost (Canon) on Oct 28, 2009 at 00:06 UTC

      I use P::W:R but then this calls subclasses that spawn interactive telnet sessions with remote devices.

      Im trying to identify at the point i try i send a message back where STDERR and STDOUT are pointed to as i think one of the subclasses has it.

      i'll see what i can come up with via lsof

Re: Details of filehandles
by moritz (Cardinal) on Oct 27, 2009 at 23:32 UTC
    With -t you can test if a file handle is connected to a terminal (and thus not redirected). I don't know how you get more specific information out of it though.
    Perl 6 - links to (nearly) everything that is Perl 6.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://803540]
Approved by biohisham
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2022-06-26 02:27 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (83 votes). Check out past polls.