From: wajnberg AT antibes DOT inra DOT fr (Eric Wajnberg) Newsgroups: comp.os.msdos.djgpp Subject: Too many open file Date: Thu, 8 May 2003 09:50:36 +0000 (UTC) Organization: I.N.R.A. Antibes (France) - Ecologie des Parasitoides Lines: 40 Message-ID: NNTP-Posting-Host: antibes.inra.fr X-Trace: saphir.jouy.inra.fr 1052387436 13441 195.221.33.1 (8 May 2003 09:50:36 GMT) X-Complaints-To: usenet AT news DOT inra DOT fr NNTP-Posting-Date: Thu, 8 May 2003 09:50:36 +0000 (UTC) X-Newsreader: TIN [version 1.2 PL2] To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Dear all, I have a problem with DJGPP that I cannot solve. I am using this compiler (on dos) to develop codes for making Monte Carlo simulations. Actually, I have two codes leading to two .exe files. The first one - let call it A.exe - is making a simulation with a set of parameters, and the results are saved (append) to an ascii file. The second one - let call it B.exe - is a "launcher" lanching thousands of times A.exe with different parameters (e.g., for making a sensitivity analysis). The two codes are discussing together through an (other) ascii file where the parameters are saved by B.exe and red by A.exe each time A.exe is launched. The system works properly but, after a while, B.exe crashes with the following message: Configuration: Too many open files (EMFILE). I've cheched all my codes and all files opened (fopen()) are properly and rigorously closed, and there are fsync() and fflush() everywhere. Can someone help me on that? Thanks in advance for any help. Best, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Eric Wajnberg Directeur adjoint du GDR CNRS 2155 Ecologie Comportementale I.N.R.A. 37, Bld. du Cap. 06600 Antibes. France. Tel : (33-0) 4.93.67.88.92 Fax : (33-0) 4.93.67.88.97 e-mail : wajnberg AT antibes DOT inra DOT fr Web page: http://www.antibes.inra.fr/perso/wajnberg/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~