Date: Mon, 22 Feb 2010 11:27:47 +0000 (GMT) From: Robert Watson <rwatson@FreeBSD.org> To: Ulrich Spoerlein <uqs@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204178 - head/games/fortune/fortune Message-ID: <alpine.BSF.2.00.1002221126240.80183@fledge.watson.org> In-Reply-To: <201002212103.o1LL3FGS037889@svn.freebsd.org> References: <201002212103.o1LL3FGS037889@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 21 Feb 2010, Ulrich Spoerlein wrote: > Prefer exit(0) from main over return(0). > > Although not explicitly mentioned in style(9), it allows for easier > grepping of exit points. This reverts part of r203926. A few people (including me) have tripped up over exit handling and style in the past. It might be nice to formulate some specific sentences about program exit paths, functions, and also return values, to put in the style guide. For example, we have sysexits(3), but my understanding is we prefer not to use it. Likewise, we do like to use err()/warn() in preference to perror() and exit(), etc. Robert
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1002221126240.80183>