[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Ammount of file descriptors per process



Hi!

Adam Klobukowski wrote:

Frank Naumann napisał(a):

RLIMIT_NOFILE

    This is a number one greater than the maximum value that the system
    may assign to a newly-created descriptor. If this limit is exceeded,
    functions that allocate new file descriptors may fail with errno set
    to [EMFILE]. This limit constrains the number of file descriptors
    that a process may allocate.

And after how many files there is EMFILE error there? Could comeone test it?

3. Opening (creating) files using system call Fcreate(), the maximum ammount of files it tries to open is taken from Sysconf(SYS_MAXFILES) system call.

 * Sysconf(which): returns information about system configuration.
 *       2      max. number of open files per process   {OPEN_MAX}

Ad 3. Sysconf(SYS_MAXFILES) returns 32. Test fails after opening 26 files.

This is not the number of files you can open, this is the maximum number of files a process can have open.

Hoops this sentence is where my English fails completely, could you write it some other way for us (yes, we are more than one here that didn't get it)?

Under Unix every process have at least 3 open file descriptors at
>> start (stdin, stdout, stderr). Under FreeMiNT it's more due to
>> TOS emulation.

Right. Hmm, so does Sysconf(2) return the number of files a single process can open (32)?

STanda