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 15:30:19 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!lnsnews.lns.cornell.edu!newsstand.cit.cornell.edu!news.stealth.net!news.stealth.net!news-east.rr.com!cyclone.columbus.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3D6D4F44.4872BCFA@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> <3D6D00B9.60EECCFB@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 28 Aug 2002 22:30:18 GMT NNTP-Posting-Host: 66.75.148.61 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1030573818 66.75.148.61 (Wed, 28 Aug 2002 15:30:18 PDT) NNTP-Posting-Date: Wed, 28 Aug 2002 15:30:18 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:28529 Date: 2002-08-28T22:30:18+00:00 List-Id: Robert A Duff wrote: > > 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. > > So if it's checked for, what's the problem? Well, it isn't the OS doing it. > The OS has to recover from those nasties > without leaking resources. It doesn't recover from those nasties without leaking resources. > So surely calling "exit" is no worse. Correct. I'm not arguing that you shouldn't have "exit". I'm merely saying that "the OS cleans up all externally-visible resources" is an oversimplification. > I don't know Amiga, but it seems to me that if a crashed program causes > memory leaks, the OS is broken. No more than "a crashed program might leave half-written temp files around" is "broken". > > So no, in general, a "proper" operating system doesn't clean up all visible > > resources. Not even with exit() calls. :-) > > I guess it depends on what "proper" OS means. I'm assuming hardware > memory protection, and an OS that takes advantage of that to reclaim > resources from crashed processes. I think it more depends on what you mean by "resources". I've worked on OSes where you had "temp files" that went away when you logged out. UNIX doesn't have that. Are junk-files in /tmp a "resource leak" the OS should clean up? -- 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.