#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
int i;
for(i = 1; i != 10000; ++i)
{
char filename[101];
int n = sprintf(&filename[0], "file-%d", i);
FILE* stm = fopen(filename, "w");
if(NULL == stm)
{
fprintf(stderr, "failed to create %s: %s; FOPEN_MAX=%d\n", filename, strerror(errno), FOPEN_MAX);
return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;
}
Saturday, June 6, 2009
Practical determination of fopen() concurrency
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment