6

Given a file descriptor, is there a way in Linux to find out how many other file descriptors refer to the same file description (i.e. how often dup was called, not how often open was called)?

I do not need to know which ones (they might be even in a different process by now). In fact I'd be quite happy knowing whether there are ANY or if this fd is a unique reference.

Seb
  • 61
  • 3
  • Well, my question isn't exactly a duplicate since what I'm asking is a simpler thing: I just want to know how many there are, not exactly which ones. In fact I'm actually only interested in whether there are ANY that were duped. – Seb Aug 25 '16 at 10:10
  • 3
    Related: [find out which file descriptors share the same "open file description"](https://unix.stackexchange.com/q/191967) – Stéphane Chazelas Aug 25 '16 at 10:27

0 Answers0