title: How to block the read system call
body: <p>I don't understand how read() system blocks. I have created an empty file and trying to read using the read() system call. It returns 0.</p>
  
  <pre><code>fd = open("Demo.txt",O_RDONLY);
  n = read(fd,&amp;ch,10); // returns 0 
  </code></pre>
  
  <p>I am expecting read() to block indefinitely as there is no data in the file. Does read() consider EOF as a valid data and return immediately ? Is my understanding correct ?</p>