Mail Archives: djgpp/2009/03/24/11:43:41
> Date: Tue, 24 Mar 2009 00:40:03 -0400
> From: Ethan Rosenberg <ethros AT earthlink DOT net>
>
> I have a program that opens almost 30 files. My config.sys has
> files=50. The function listed below is where the problem is. It
> runs perfectly when there are approx less than 20 writes to each of
> the file pointers. With fptr27 and fptr25, after approx 20 writes,
> it gives garbage. When I examine the output from the write, [fptr27
> and fptr25], the beginning approx 20 lines of the output is OK, and
> then garbage. The sprintf function works perfectly. I have stepped
> thru the program and seen that the fwrite function is getting the
> correct input. I have checked the function with splint, and it finds
> no errors.
You didn't show the code which opens the files, and I think you are
assuming too much about the root cause of the problem. I suggest to
separate the variables: first, can you write a simple program that
just opens more than 20 files, writes a constant string into each one
of them, and the exits? If you run such a program, do you get all the
files on disk with the string you wrote into them, or don't you?
- Raw text -