Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How to find all open STDERR and STDOUT dups?

by almut (Canon)
on Mar 31, 2009 at 18:16 UTC ( [id://754492]=note: print w/replies, xml ) Need Help??


in reply to How to find all open STDERR and STDOUT dups?

I would use lsof(8)/linux for such problems, because in case some XS code has done the dup(2), you may not have much luck finding anything related in the symbol table...

  • Comment on Re: How to find all open STDERR and STDOUT dups?

Replies are listed 'Best First'.
Re^2: How to find all open STDERR and STDOUT dups?
by tilly (Archbishop) on Mar 31, 2009 at 19:14 UTC
    It seems to me that lsof can confirm that something, somewhere, has STDERR open when it shouldn't. But does that really help in tracking down that something, somewhere?

    While symbol table hackery is imperfect, it is a reasonable next step after that point.

      Both approaches are imperfect. But ultimately, I consider the info you can retrieve via lsof more useful than what you might find when digging around in the symbol table. The two main issues with the symbol table are:

      • the file descriptor number in question may not be the one you're looking for (see my other reply below)
      • the dup(2) may not have left any traces in Perl's symbol table at all (as I tried to point out above), in case the dup happened via some C-level code in an XS module.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-19 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found