Xref: utzoo alt.msdos.programmer:1335 comp.sys.ibm.pc:45647 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!fernwood!vixie!pacbell!att!cbnewse!curtin From: curtin@cbnewse.ATT.COM (C.S.Curtin) Newsgroups: alt.msdos.programmer,comp.sys.ibm.pc Subject: ms-dos FILES=fd in config.sys parameter Keywords: config FILES MS4.01 Message-ID: <13340@cbnewse.ATT.COM> Date: 3 Mar 90 16:23:56 GMT Organization: AT&T Bell Laboratories, Naperville, IL. Lines: 62 i am having a problem using MS-DOS 4.01 with the number of file descriptors available. i changed config.sys to files=100 but cannot get ms-dos to exceed 20 (the pre-dos3.3 maximum). i wrote a small test program in msc5.1 to see the difference of changing my config.sys and still cannot exceed the 20 open files. is there a way for dos to tell me the current maximum number of file descriptors available? (while ms-dos is running?) (i know that you can "type c:\config.sys", but is there any other way to dump the max_index_length of the fd table?) in the example program the file being opened is the same one, i had a version that in each loop created a unique file name. this version obtained the same results. please reply via e-mail, i will summarize if enough interest. any help is greatly appreciated, thanks! craig curtin /\/\/\/\/\/\/\/\/\/\/\ fd.c /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ #include #include /* for open flags */ #include /* needed for stat.h */ #include /* needed for S_IREAD/S_IWRITE */ void main() { int i,fd; for (i=0;i<300;i++) { /* create any old junk file */ if((fd=open("xx",(int)(O_CREAT|O_TRUNC|O_WRONLY|O_BINARY), S_IREAD|S_IWRITE)) < 0) { /* wow, something caused an error*/ perror("failed on open"); exit(); } fprintf(stdout,"successfully opened %d\n",fd); } } /\/\/\/\/\/\/\/\/\/\/\ fd.exe output /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ successfully opened 5 successfully opened 6 successfully opened 7 successfully opened 8 successfully opened 9 successfully opened 10 successfully opened 11 successfully opened 12 successfully opened 13 successfully opened 14 successfully opened 15 successfully opened 16 successfully opened 17 successfully opened 18 successfully opened 19 failed on open: Too many open files /\/\/\/\/\/\/\/\/\/\/\ fd.exe output /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ i understand that msc opens fd 0-4 making the first available #5. (btw: perror() sends output to stderr)