From: Norbert Bladt (nbladt@autelca.ascom.ch)
Date: 09/23/92


From: nbladt@autelca.ascom.ch (Norbert Bladt)
Subject: Re: PROBLEM COMPILING OLVWM
Date: Wed, 23 Sep 1992 09:16:29 GMT

nmp08@rz.uni-kiel.dbp.de (21-SEP-1992 12:47:04.70) writes:

>Hi again!

>I finally managed to compile olvwm from tsx-11. But one problem encountered
>during the compilation: a constant named RLIMIT_NOFILE wasn't defined.
>I wonder to which header file it belongs and what the correct value is.
>I'm using gcc 2.2.2d7 with 4.1 libraries and header files together with
>X11 v1.1. Any ideas?
I did compile olvwm on SUN's several times. So, I looked into it.
This RLIMIT_NOFILE is in /usr/include/sys/resource.h.
RLIMIT means, of course, Resource LIMIT. The header line says that this
file originally was from UCB 4.1 (which means BSD 4.1).
Since there are several resource limits, e.g. for CPU, stack, core, data,
etc. there is a code for the different limits. This code may indicate
which resource limit an application has reached, but I am not so sure
for this.
Anyway, the RLIMIT_NOFILE is the code number for the limit on number of open
files, I guess.
It is totally different from the maximum number of open files, though.
RLIMIT_NOFILE is defined to be 6.
However, you can't have more files open than six at a time, I think.

So, this might be a return-code your application might get from a system call.
To repeat: it is NOT the max. number of open files.

Hope this helps,

Norbert.

-- 
Norbert Bladt, Ascom Autelca AG, Worbstr. 201, CH-3073 Guemligen, Switzerland
Phone: +41 31 999 65 52                 FAX: +41 31 999 65 44
Mail: nbladt@autelca.ascom.ch   UUCP: ..!uunet!mcsun!chsun!hslrswi!aut!nbladt