I'm running RedHat 2.4.20-8, doing some research. For this, I need to use an external program called MSMS. In order to automate it with my C++ code, I hacked together some things which print out my values to a file, runs the program on the file which generates output, and then reads in the output. These files always have the same name, and I need to do this thousands of times per run. However, on the 511th iteration through a loop, MSMS tells me that it is not able to open the output file to write to. It was such an odd number I was wondering if perhaps it's some limitation that the kernel enforces?

I duplicated this with another file (open, write, close over and over again) and everything worked just fine. So I'm pretty clueless as to why this is happening. Any ideas?