title: How to block file when you reading (fopen) it
body: <p>How to block file when you reading it (by fopen or open in linux), to prevent any modifications during reading?</p>
  
  <p>What i have: 1 file with data; I want to read data from it in my function, so i use fopen():</p>
  
  <p>FILE *file = fopen(fileName, "r");
  Now i need something to block my file - <strong>any (or only current user's as variant) another process mustn't have any access (or only modify it as variant) to it until my function will allow them to do it</strong></p>
  
  <p>I suppose, i can do that using set chmod flags for them and setting them back after work;
  Or using open() function with special flags arguments, but it's not desirable  because i would like to work with fgets() in function;</p>
  
  <p>Is there any examples of how to do it?</p>