🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #5919

Re: Does Everybody leave dos.library open?

#5919
From: Dave Mc Mahan
Date: Thu, 18 Oct 1990 02:38
29 lines
2028 bytes
 In a previous article, kris@kriski.toppoint.de (Kristian Koehntopp) writes:
>In article <14721@netcom.UUCP> mcmahan@netcom.UUCP (Dave Mc Mahan) writes:
>>   I was just cruising through some software today, and noticed that many
>>   programs leave the dos.library open after exiting.  It seems to be
>>   a majority in the (limited) sample of stuff I tested, mostly PD.
>
>This is due to an error in the startup-code of Manx Aztec C Compiler, which
>was present to at least version 3.6. This startup-code opened the
>dos.library but did not close it automatically. I always added an appropiate
>"CloseLibrary" to my programs.

Technically, I don't think this is legal to do from within your program.  What
happens if you close the library, but the exit code produced by the compiler
(located in manx:crt_src/_main.c for the Manx compiler I have) tries to do
something with the library?  Things that come to mind are the CloseLib() calls
that Manx makes to close libraries it has opened.  Technically, if you close
the library, the program should never use it again because it may have been
flushed from memory.  To do this correctly, you would have to modify the
example _main.c source file provided by Manx and then make that your standard
startup call.  In real life, just using the dos.library even though your
program as closed it earlier is probably no big deal since several other
programs are using it at the same time so it is always open, but it is
technically not a good idea.

>Kristian


   -dave
Technical Details
Message-ID: <15062@netcom.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!netcom!mcmahan
References: <CEDMAN.90Oct13225759@lynx.ps.uci.edu> <14766@netcom.UUCP> <1278@kriski.toppoint.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!netcom!mcmahan
From: mcmahan@netcom.UUCP (Dave Mc Mahan)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Does Everybody leave dos.library open?
Message-ID: <15062@netcom.UUCP>
Date: 18 Oct 90 02:38:32 GMT
References: <CEDMAN.90Oct13225759@lynx.ps.uci.edu> <14766@netcom.UUCP> <1278@kriski.toppoint.de>
Organization: Dave McMahan @ NetCom Services
Lines: 29