From mint-bounce@lists.fishpool.fi Tue Nov 30 11:53:18 2004 X-Original-To: fnaumann@mail.boerde.de Delivered-To: fnaumann@mail.boerde.de Message-ID: <41AC50E0.80809@gabo.pl> Date: Tue, 30 Nov 2004 11:52:16 +0100 From: Adam Klobukowski User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: mint@fishpool.com Subject: Re: [MiNT] Ammount of file descriptors per process References: <41AC2CD6.6030000@gabo.pl> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-To: mint-bounce@lists.fishpool.fi X-original-sender: atari@gabo.pl Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: X-Virus-Scanned: by amavisd-new at relay.boerde.de X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on relay.boerde.de X-Spam-Status: No, hits=-1.0 tagged_above=-50.5 required=3.8 tests=BAYES_00 X-Spam-Level: Frank Naumann napisa=C5=82(a): > RLIMIT_NOFILE >=20 > 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 se= t > to [EMFILE]. This limit constrains the number of file descriptors > that a process may allocate. Ok, it looks that KR "Ansi C" is not a reliable source when it comes to=20 std library. >> 3. Opening (creating) files using system call Fcreate(), the maximum=20 >> ammount of files it tries to open is taken from Sysconf(SYS_MAXFILES)=20 >> system call. >=20 >=20 > * Sysconf(which): returns information about system configuration. > * 2 max. number of open files per process {OPEN_MAX} >=20 >> Ad 3. Sysconf(SYS_MAXFILES) returns 32. Test fails after opening 26=20 >> files. >=20 >=20 > This is not the number of files you can open, this is the maximum numbe= r=20 > of files a process can have open. Under Unix every process have at leas= t=20 > 3 open file descriptors at start (stdin, stdout, stderr). Under FreeMiN= T=20 > it's more due to TOS emulation. My bad english, that was what I meant. >> Or, if I'm wrong please correct me. >=20 >=20 > Except the FOPEN_MAX constant I don't see any problem or violation of=20 > the standards. Thanks. Btw. How can i hesk how many fd a procces have already opened? /kern/*/fd= ? --=20 Semper Fidelis Adam Klobukowski atari@gabo.pl