Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!vrdxhq!bms-at!stuart From: stuart@bms-at.UUCP (Stuart D. Gathman) Newsgroups: comp.os.minix Subject: Re: cal(1) -- really exit(3) Message-ID: <410@bms-at.UUCP> Date: Sat, 4-Jul-87 22:12:11 EDT Article-I.D.: bms-at.410 Posted: Sat Jul 4 22:12:11 1987 Date-Received: Sun, 5-Jul-87 03:27:22 EDT References: <3118@felix.UUCP> <2352@hoptoad.uucp> <3169@felix.UUCP> Organization: Business Management Systems, Inc., Fairfax, VA Lines: 14 Summary: An even better solution In article <3169@felix.UUCP>, zemon@felix.UUCP (Art Zemon) writes: > I think a better solution would be to rename the existing > exit() to _exit() and create an exit() subroutine which > calls _cleanup() and change the tools which don't use stdio > to call _exit(). Whew! I said all that in one breath. :-) An even better solution is to have exit(1) invoke an (initially empty) chain of pointers to cleanup functions. Have _flushin (or whatever) install _cleanup() when invoked the first time. Modifying fopen(3) doesn't work for stdin & stdout! -- Stuart D. Gathman<..!seismo!dgis!bms-at!stuart>