Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ico!nbires!maa From: maa@nbires.nbi.com (Mark Armbrust) Newsgroups: comp.sys.ibm.pc Subject: Re: Redirect > nul affects procomm, why? Summary: TSR doesn't close files. Message-ID: <427@nbires.nbi.com> Date: 18 Jul 89 16:22:16 GMT References: <24c29f1b@ralf> Reply-To: maa@nbires.UUCP (Mark Armbrust) Organization: NBI Inc, Boulder CO Lines: 17 In article <24c29f1b@ralf> Ralf.Brown@B.GP.CS.CMU.EDU writes: > >It seems that DOS doesn't close open files when a program goes TSR. Since the >">NUL" redirection opens a file for the duration of the program, that file >stays open after the program goes TSR (files ARE closed on non-TSR >termination). I just looked at my 3.30 disassembly, this is indeed true. I'd guess that the rationale for this was that the TSR was going to use the files later in its life. There's only one problem with this -- MS didn't tell programmers how to save/change/restore the PID within the TSR so that it could use these files that were so [in]conveniently left open! -- Mark Armbrust maa@nbires.nbi.com maa@nbires.UUCP