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 09:55:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.socal.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3D6D00B9.60EECCFB@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: stupid question: how can I finish a program? References: <5ee5b646.0208241822.34540e8b@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 28 Aug 2002 16:55:12 GMT NNTP-Posting-Host: 66.75.148.61 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1030553712 66.75.148.61 (Wed, 28 Aug 2002 09:55:12 PDT) NNTP-Posting-Date: Wed, 28 Aug 2002 09:55:12 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:28510 Date: 2002-08-28T16:55:12+00:00 List-Id: 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. :-) -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. ** http://images.fbrtech.com/dnew/ ** Try our EbolaBurgers... So tender they melt in your mouth.