title: lseek giving ESPIPE error
body: <p>I have a normal file opened, it acts as a database of records. I opened it as:</p>
  
  <pre><code>fd = open ("file", O_CREAT | O_APPEND | O_RDWR, 0644);
  </code></pre>
  
  <p>Then in my <code>find_record</code> function,  I move the offset to the beginning.</p>
  
  <pre><code>ret_val = lseek(fd, 0, SEEK_SET);
  </code></pre>
  
  <p>Its throwing an <code>ESPIPE</code> error. Right now I don't know what's happening.
  Is my file descriptor treated as a pipe? if yes, Why?</p>
  
  <p>Is <code>lseek</code> actually working ? Its should be beacuse the <code>ret_val</code> is not -1.</p>