🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2
Article #564

Re: Question on increasing File Handle limit in MSC

#564
From: Eric SASSAMAN
Date: Wed, 02 May 1990 01:55
38 lines
2264 bytes
> > higgins@garnet.berkeley.edu writes:
> >
> > QUESTION: What do I need to do to MSC 5.1 in order to increase the
> > number of openned files. Is it somewhere in the startup routine that
> > calls main().
>
> Exactly where it is in the MSC code, I don't know, but many C
> compilers set up a fixed-length array to hold the addresses of the
> FILE structures relating to open files. Typically, it's in the
> libraries somewhere, and there's a definition
>
>     #define MAXFILES 20
>
> or something similar in one of the headers (most likely stdio.h). Call
> Microsoft and ask them. 'Course, they'll probably tell you to go "to
> the place where it's never cold". 8-)

Under OS/2, you can increase the number of available file handles
available to the current process (and any of it's child processes)
with the call DosSetMaxFH, which is documented in the OS/2
Programmer's Reference, Volume 3 (for 1.1) and Volume 4 (for 1.2). The
maximum number of available handles must be between 20 and 255 (the
upper limit increases to 32,768 under OS/2 1.2). By the way, the
FILES= statement in your config.sys is only used by the DOS box. It is
not used by OS/2. Under OS/2, the default maximum file handles is 20.
Also, remember that handles 0, 1, and 2 are already in use by stdin,
stdout, and stderr.

If you are using standard C I/O calls, such as fopen(), then you will
have a compiler imposed limit on the maximum number of file handles
available. Please see the file README.DOC included with either MSC 5.1
or MSC 6.0. README.DOC contains detailed information on how to
increase the maximum number of available file handles. README.DOC is
on the "setup" disk for both versions.

This should take care of your problem of running out of file handles.

And I don't think Microsoft would have said that :-)
Technical Details
Message-ID: <54434@microsoft.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!ericsa
References: <1990Apr21.033414.16952@agate.berkeley.edu> <899@tmiuv0.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!ericsa
From: ericsa@microsoft.UUCP (Eric SASSAMAN)
Newsgroups: comp.os.os2,comp.lang.c
Subject: Re: Question on increasing File Handle limit in MSC
Message-ID: <54434@microsoft.UUCP>
Date: 2 May 90 01:55:02 GMT
References: <1990Apr21.033414.16952@agate.berkeley.edu> <899@tmiuv0.uucp>
Organization: Microsoft Corp., Redmond WA
Lines: 38