From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f6ee8ca03c176d76 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-28 10:36:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!newsfeed.cwix.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: stupid question: how can I finish a program? Date: 28 Aug 2002 12:36:08 -0600 Organization: LJK Software Message-ID: References: <5ee5b646.0208241822.34540e8b@posting.google.com> <3D6D00B9.60EECCFB@san.rr.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1030555090 26109 192.135.80.34 (28 Aug 2002 17:18:10 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Wed, 28 Aug 2002 17:18:10 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:28515 Date: 2002-08-28T12:36:08-06:00 List-Id: In article <3D6D00B9.60EECCFB@san.rr.com>, Darren New writes: > Robert A Duff wrote: >> If you're running under a proper operating system, then all resources >> visible outside the program will be cleaned up when the program exits. > > This is true only in the most trivial sense. If I have a program that > contacts a license manager (for example) and grabs the license, then aborts, > I could be in trouble. That's why license managers check for that sort of > failure. If I create a lock-file, that lock-file doesn't get cleaned up > (under UNIX, for example). > > Other OSes (like Amiga's OS) specifically don't clean up anything at all, as > this lets you do things like allocate memory, load a program into it, and > start it up and then exit yourself. You have to clean it up for yourself. > > Some mainframe OSes leave the clean-up to the shell. It's the shell's > responsibility to free the memory and close the files. However, I'd expect > that one would count the shell as "part of the OS" in these systems. > > So no, in general, a "proper" operating system doesn't clean up all visible > resources. Not even with exit() calls. :-) The "proper" operating system on my computer does. The license manager uses the Distributed Lock Manager and per-user licenses automatically return to the pool on image rundown.