From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: "Douglas A. Gwyn" Message-ID: <3AE83E36.59219907@arl.army.mil> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <3AE4B6C2.28D1E595@arl.army.mil>, <200104241743.NAA06070@egyptian-gods.MIT.EDU> Subject: Re: [9fans] the declaration of main() Date: Thu, 26 Apr 2001 15:55:36 +0000 Topicbox-Message-UUID: 90ae8a14-eac9-11e9-9e20-41e7f4b1d025 Greg Hudson wrote: > If you return from main, the cleanup handler will be called, but all > of main's automatic variables (including the buffer you passed to > setvbuf()) are no longer valid. If you explicitly call exit(), then > main()'s automatic variables are still valid. Oh, okay. One of a zillion potential pitfalls that a C programmer needs to avoid. Patient: Doctor, it hurts when I do *this*! Doctor: So don't do *that*!