title: C file synchronization
body: <p>I would like to open a file in C where the reads and writes are both synchronized. Is the proper way </p>
  
  <pre><code>    fopen("file.txt", O_DSYNCH | O_RSYNCH)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>    fopen("file.txt", O_SYNCH)
  </code></pre>
  
  <p>This is for use on Linux</p>