title: open versus fopen in C program (with multi-threading)
body: <p>For an unknown reason, it seems that fopen fails to open text files when it is called repeated times before closing.</p>
  
  <p>My C program uses multithreading, and each thread handles one type of output text files (eleven per type), each type in a separated folder. I need to mantain these files opened during a long execution and at the same thread in order to write a lot of data.</p>
  
  <p>To explain it better, the process is the following:</p>
  
  <p>1- Thread #1 starts and creates and writes 11 files in one folder.</p>
  
  <p>2- Without closing previous files, Thread #2 starts and creates and writes another 11 files in a different folder.</p>
  
  <p>3- The same with other two Threads.</p>
  
  <p>4- In the end, when all the files needed have been created and all the Threads have finished unless the main one, all the files are closed.</p>
  
  <p>However and surprisingly, open is do able to handle all this files at the same time. Does anybody have a tip about this issue with fopen? I don't know if it is related with the multi-threading or with a max number of files that fopen can handle at the same time.</p>
  
  <p>I am in Windows platform with Borland compiler.</p>