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