title: file read error: success
body: <p>I have basic code as follows,</p>
  
  <pre><code>   fd = open("test.file", O_RDONLY);
     if (read(fd, &amp;tempch, 1) &lt; 1) {
           perror("File Read Error");
           exit(1);
     }
     printf("We could read from the file\n");
  </code></pre>
  
  <p>the test.file is present in file system and has been granted with 777 rights. the program throws error "file read error: success"... could anybody tell the possible reason? thanks</p>