Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!columbia!rutgers!cbmvax!higgin
From: higgin@cbmvax.UUCP (Paul Higginbottom SALES)
Newsgroups: comp.sys.amiga
Subject: Re: What opens dos.library, and why doesn't it close?
Message-ID: <2110@cbmvax.UUCP>
Date: Tue, 14-Jul-87 09:20:56 EDT
Article-I.D.: cbmvax.2110
Posted: Tue Jul 14 09:20:56 1987
Date-Received: Fri, 17-Jul-87 02:45:11 EDT
References: <0274526P@NAVPGS>
Reply-To: higgin@cbmvax.UUCP (Paul Higginbottom SALES)
Organization: Commodore Technology, West Chester, PA
Lines: 24

LT Scott A. Norton, USN writes:
$Hacking one evening with the AmigaMonitor, I noticed that the
$dos.library had an Open count over 10, where other libraries had
$2 at most Opens.  After calling up a few programs I noticed that
$this open count was never decremented.  What is going on?

"dos.library" is opened by the Manx startup code (_main()), but is not
closed in exit().

$Should I close dos.library myself?  ( Can I even get the value of
$DosBase if the loader opened it for me?  )

DOSBase is created and set in the startup code, so it would be a global
variable for you if you wanted it.  Not a good idea to close it though
since the exit() code may need to do DOS functions after you've closed
it (can you say "boom boom"?).

$4.  Does it really matter?  Since the dos.library is almost as
$fundimental as the exec.library, I don't expect it will drop to
$an OpenCount of 0 and be unloaded.

No, but it's bad practice that it doesn't get closed.

	Paul Higginbottom.