🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3758

Re: Exit without closing files

#3758
From: Fridrik Skulason
Date: Tue, 13 Oct 1992 15:25
12 lines
851 bytes
bsn@world.std.com (Brent S Noorda) writes:

>I would like to have a program open a file, pass the handle to a TSR, then
>exit so that the TSR can continue to write to the file.  However, the
>DOS exit function closes all files opened by the executable.  Is there a way
>to exit without closing opened files?

Before you open the file, you set the PSP to the TSR's PSP (but don't
forget to reset it later).  Then the TSR will "own" the file, and it
will not be closed when you exit.

-frisk
Technical Details
Message-ID: <103@complex.complex.is>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!isgate!complex!frisk
References: <Bw29qC.1F9@world.std.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!isgate!complex!frisk
From: frisk@complex.is (Fridrik Skulason)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Exit without closing files
Message-ID: <103@complex.complex.is>
Date: 13 Oct 92 15:25:50 GMT
References: <Bw29qC.1F9@world.std.com>
Organization: Frisk Software International, Iceland
Lines: 12