home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.21 / text0043.txt < prev    next >
Encoding:
Internet Message Format  |  1990-10-26  |  1.2 KB

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