Out of descriptors, out of luck?

Fletcher Kittredge fkittred at bbn.com
Thu Apr 18 21:57:27 AEST 1991


In article <195 at bria.UUCP> uunet!bria!mike writes:
>In an article, rds at ECLU.psu.edu (R. David Singh) writes:
>>Hmm, does anyone know of a way to increase the tablesize of file descriptors
>>available to a process.  getdtablesize() gives me 60 (which just won't cut it)
>>and my program is barfing up fragments.
>
>Please.  This is hardly a wizardly question.  Go RTFM on how to configure
>and relink your kernel.

Far be it for me to question the quick response of a wizard such as yourself,
but isn't this a ignorant answer to a good question?  I would think a
real wizard would say that there are two ways to do this.  Reconfiguring
the kernel is inappropriate in most cases.  Many modern Unix systems support
the setrlimit().  If the man page for setrlimit() says that it supports
RLIMIT_NOFILE, then you can up the limit for the number of open files. Sun
O/S >=4.0 and HP-UX >=8.0 are examples of two operating systems which support
this facility.  See setrlimit() for details, if you have a POSIX.1 compliant
system, then sysconf() would also be of interest.

fletcher
Fletcher Kittredge
Senior Engineer, BBN Software Products
150 CambridgePark Dr,  Cambridge, MA. 02140
617-873-3465  /  fkittred at bbn.com  /  fkittred at das.harvard.edu



More information about the Comp.unix.wizards mailing list