home *** CD-ROM | disk | FTP | other *** search
- From: sp@mysteron.osf.org (Simon Patience)
-
- Recently, while discussing pthreads, I mentioned the use of atexit()
- as a way of helping thread cleanup if another thread calls exit().
- It was pointed out to me that atexit() is not defined in 1003.1
- 1988.
-
- I looked it up and sure enough it is not in the fabled list of ANSI
- C interfaces on page 141 and on page 183 it says that as exit()
- must do all the things _exit() does then this allows 1003.1 to
- ignore the atexit() function. I have to admit that I didn't understand
- that logic at all as it ignores the use of atexit() by the application
- to clean up inter-process state that the kernel cannot know about
- (such as data consistency in shared memory etc etc).
-
- I originally assumed that as .1 #includes all of ANSI C then atexit()
- would be able to be used in a conforming application but the book
- appears to indicate otherwise.
-
- So, can anyone in .1 explain whether atexit() really is required
- by .1 or not and if not, what the rationale is because I don't
- understand what the book is getting at.
-
- Simon Patience Phone: (617) 621-8736
- Open Software Foundation FAX: (617) 225-2782
- 11 Cambridge Center Email: sp@osf.org
- Cambridge MA 02142 uunet!osf.org!sp
-
- Volume-Number: Volume 21, Number 44
-
-