Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!crdgw1!sagittarius!dixon From: dixon@sagittarius.crd.ge.com (walt dixon) Newsgroups: comp.sys.ibm.pc Subject: Re: ms-dos FILES=fd in config Message-ID: <5928@crdgw1.crd.ge.com> Date: 9 Mar 90 21:26:33 GMT References: <90030820225859@masnet.uucp> Sender: news@crdgw1.crd.ge.com Reply-To: dixon@sagittarius.crd.ge.com (walt dixon) Organization: General Electric Corp. R&D, Schenectady, NY Lines: 33 In a reply to my previous article bradley grigor writes: [most of message deleted] >Note: despite the documentation, a child process created with the >Exec function can only inherit twenty file handles from its >parent. One would have thought that this would have been cleaned up in DOS 3.3. The DOS 3.1 duplicate PSP code which is called by the int 21h load function (actually at an alternate entry point that sets a flag indicating an internal request), the code exlicitly loads a count of 20 into cx and loops through the JFT. In this older version of DOS there was no explicit support for an alternate JFT (although it worked, sort of). The inheritance logic is really pretty simple. Omiting some details pertaining to file sharing and network devices, DOS (in the internal duplicate PSP function) scans the JFT. For every open file the mode field in the SFT is checked looking at the inheritance bit. If the bit is set, the system file number from the JFT is copied to the new JFT (in the new PSP). The refernce count in the SFT is incremented and the device driver is called if it supports open/close requests and the device is a character or the device is a block device and file sharing is enabled. One could duplicate this function if necessary. Walt Dixon {arpa: dixon@crd.ge.com } {us mail: ge crd } { po box 8 } { schenectady, ny 12301 } {phone: 518-387-5798 } Walt Dixon dixon@crd.ge.com