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

You actually want to stat stuff and compare the resulting device, inode, etc. fileno returns the descriptor, but dup creates a new file descriptor pointing to the same underlying file.
  • Comment on Re^2: How to find all open STDERR and STDOUT dups?