Re: Write to a closed stream bug.

Ken Clark (
Thu, 18 Dec 1997 10:42:36 -0800

>About scaling: Yes, it is true that checking for this condition would
>require one mov somewhere inn fclose. Do you think that this is anissue?

One mov eh? Please show us how. Make sure it works on the following
without having scaling problems with allocation of FILE handles.

#define BIG (1024*1024)
FILE *fa[BIG];
int i;
for (i = 0; i < BIG; i++) {
fa[i] = fopen("AgainNotLikely.IMO", "w");
for (i=0; i < BIG; i++) {
fprintf(fa[i], "Hello World");