Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: return vs exit() Message-ID: <497@cresswell.quintus.UUCP> Date: 27 Dec 87 05:18:53 GMT References: <10875@brl-adm.ARPA> <176@fxgrp.UUCP> <1286@laidbak.UUCP> <454@viper.Lynx.MN.Org> Organization: Quintus Computer Systems, Mountain View, CA Lines: 10 Summary: never return from main() From K&R and Univ V7 I expected that just falling off the end of main() would be equivalent to exit(0). Then I used System V/386, and a lot of my makefiles broke. Now I try to end main() with exit(0); /*NOTREACHED*/ } The ANSI C committee would have a hard time making the portability of programs which rely on falling of the end of main() any worse; to ensure [that's the right spelling] that your programs will work in >UNIX< you had better stick to exit().