title: addind FILE_SHARE_READ mode with cygwin
body: <p>I did a very simple program in C for linux a few months ago to read data from a socket and write it to disk. Now I want to run it on Windows, so I installed cygwin and everything worked fine.</p>
  
  <p>The problem appears in windows when my program is writing the data to a file and, at the same time, I try to open that file with another tool. It complains and doesn't open the file because it is opened by other process.</p>
  
  <p>After googleing, I have read that to avoid that, in windows, you have to create the file with SHARE_FILE_READ and SHARE_FILE_WRITE flags, but the problem is that my program is written in C for linux and I just use a standard open syscall..</p>
  
  <p>Is there any way to tell cygwin to add that shared modes to the file that my program is opening?</p>