title: How can I tell if a file is open elsewhere in C on Linux?
body: <p>How can I tell if a file is open in C? I think the more technical question would be how can I retrieve the number of references to a existing file and determine with that info if it is safe to open.</p>
  
  <p>The idea I am implementing is a file queue. You dump some files, my code processes the files. I don't want to start processing until the producer closes the file descriptor.</p>
  
  <p>Everything is being done in linux.</p>
  
  <p>Thanks,
  Chenz</p>