To try this i did a little C program that opens files:
Code: Select all
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<errno.h>
int main (void) {
FILE *archivos[300];
char numstr[15];
int i=0,nmax=0;
printf("\nHow many files do you want to open: ");
scanf("%d",&nmax);
for( i=0; i<nmax ; i++) {
sprintf( numstr, "test%d.dat", i);
if(!(archivos[i]=fopen( numstr ,"w")))
{
printf("\nCouldn't open file %s", numstr);
printf("\nDescription: %s\r %d", strerror(errno), errno);
printf("\nThe max open files was: %d", i);
exit(1);
}
}
printf("\nNo errors. The open files number is : %d\n", i);
for( i=0; i<nmax; i++)
fclose( archivos[i] );
return( 0 );
}
And i got this results:
C:\>test How many files do you want to open: 20 Couldn't open file test15.dat Description: No such file or directory 2 The max open files was: 15I don't have any idea what's happening, but i do know it's not only vbox guilt because i tried this program with dosemu and dosbox and got the same result, 15 files . So in this case it must be something between vbox and ubuntu.
Thanks for your help.