title: How to check if a file is already opened in C
body: <p>I am working on a multithreaded system where a file can be shared among different threads based on the file access permissions.</p>
  <p>How can I check if file is already opened by another thread?</p>