home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!watserv1!watmath!thinkage!atbowler
- From: atbowler@thinkage.on.ca (Alan Bowler)
- Subject: Re: cleanup on exit (Was Re: Chasing memory leaks: tools, procedures?)
- Message-ID: <1992Jul23.214034.3843@thinkage.on.ca>
- Organization: /etc/organization
- References: <NICKEL.92Jul19184631@desaster.cs.tu-berlin.de> <9220400.530@mulga.cs.mu.OZ.AU> <NICKEL.92Jul22200234@desaster.cs.tu-berlin.de>
- Date: Thu, 23 Jul 1992 21:40:34 GMT
- Lines: 22
-
- In article <NICKEL.92Jul22200234@desaster.cs.tu-berlin.de> nickel@cs.tu-berlin.de writes:
- >In article <9220400.530@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU
- >(Fergus James HENDERSON) writes:
- >
- >> Why not just use at_exit() to install an error handler if necessary?
- >
- >I would really *like* to use it, but it's not portable. SunOS has a
- >function
- >
- > int on_exit(procp, arg)
- >
- >POSIX doesn't define something like this, SysV.3, BSD 4.3, and Ultrix
- >don't seem to have somthing like that.
- >
-
- ANSI does define atexit(). By induction it is required by POSIX.
-
- Since ANSI and near ANSI systems are becoming very common, this means
- use of atexit() is quite portable. On many older non-ANSI
- implementations without atexit() as defined by ANSI, there frequently
- is a function like Sun's on_exit(), and in porting to those
- environments you can build your own atexit() using on_exit().
-