Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!voder!pyramid!ctnews!mitisft!dold From: dold@mitisft.Convergent.COM (Clarence Dold) Newsgroups: comp.sys.ibm.pc Subject: Re: Opening up to 255 files in DOS 3.30 Message-ID: <749@mitisft.Convergent.COM> Date: 28 Jun 89 21:59:25 GMT References: <2385@ur-cc.UUCP> Organization: Convergent Technologies, San Jose, CA Lines: 30 in article <2385@ur-cc.UUCP>, chu2_ltd@uhura.cc.rochester.edu (Jim Huang) says: > I would like to know how to open a large number of files at > once under MS-DOS 3.30. For instance, if I want to open > 50 files, I would put the line: > files = 50 > in my CONFIG.SYS file and reboot. However, this does not > seem to work. You might be encountering a compiler limitation. Microsoft QuickC won't open() files beyond the limit declared in stdio.h, even though that should have no effect unless you are trying to fopen(). Even though this isn't cross-posted, a bug has surfaced in SysV 3.0 fopen() carries it's own table of available streams. streams is generated at NFILE 20. The per-user limit NOFILES can be set as high as 100. if open(2) is used to open files, and fopen(3) is used to open a stream, there is a potential situation where the file descriptor will be higher than 20. Streams operations WILL break. In strange ways. SysV 3.2 sets NFILE 60 for stdio, but the possibility still exists. I would suggest not going to a files value higher than NFILES. -- --- Clarence A Dold - dold@tsmiti.Convergent.COM (408) 434-5293 ...pyramid!ctnews!tsmiti!dold P.O.Box 6685, San Jose, CA 95150-6685 MS#10-007