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

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.

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

Replies are listed 'Best First'.
Re^3: How to find all open STDERR and STDOUT dups?
by almut (Canon) on Mar 31, 2009 at 21:20 UTC

    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.