Subject: Re: Answer to "which echo.c"
To: Peter Seebach <seebs@plethora.net>
From: Chris G. Demetriou <cgd@netbsd.org>
List: port-i386
Date: 12/09/1999 15:04:12
seebs@plethora.net (Peter Seebach) writes:
> >D:  OpenBSD.  This one is by far the most secure.  (Just kidding!)  
> >It uses return(0), when exit(0) would be the proper thing.
> 
> Huh?  I'm not sure I see the difference; I'm assuming everything happens
> in main().

and, it depnds on what you want to use echo.c for...


if you want to be able to -Dmain=echo_cmd when compiling it, or
something similar, then you might well want return.

in either case, EXIT_SUCCESS / EXIT_FAILURE are arguably better to use
(from a stds & portability perspective) than 0/non-zero, anyway...



cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.