Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!ames!amdahl!dlb!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c Subject: Re: exit(main(argc,argv,env)); Message-ID: <174@goofy.megatest.UUCP> Date: 23 Dec 87 00:05:19 GMT References: <1286@laidbak.UUCP> Organization: Megatest Corporation, San Jose, Ca Lines: 40 [...] > At least in the UNIX environment, exit() is a function that flushes all > buffers (and closes all file descriptors?), as well as handling functions > registered via onexit(), finally calling _exit(), a system call that > never returns. > > Using return instead of exit() bypasses this cleanup operation. > > > > > -- > --------------------"Well, it looked good when I wrote it"--------------------- > Verbal: Dave Burton Net: ...!ihnp4!laidbak!daveb Hum. "onexit"... Just what's needed. (See my previous note, where I rambled on about "Lexit()". But on my Sun-3, I find no manual-page for onexit, and nm /lib/libc.a | grep onexit returns silently. So it looks as though not ALL unixes have onexit(). By the way, I've figured out what those long canned signatures with disclaimers are for. It's to keep vn from rejecting your reply because "quoted text is longer than new text"! So... Dave Jones Megatest Corp. 880 Fox Lane San Jose, CA. 95131 (408) 437-9700 Ext 3227 UUCP: ucbvax!sun!megatest!djones ARPA: megatest!djones@riacs.ARPA