Subject: Re: Answer to "which echo.c"
To: Peter Seebach <email@example.com>
From: Chris G. Demetriou <firstname.lastname@example.org>
Date: 12/09/1999 15:04:12
email@example.com (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...
Chris Demetriou - firstname.lastname@example.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.