Subject: Re: Answer to "which echo.c"
To: Peter Seebach <>
From: Chris G. Demetriou <>
List: current-users
Date: 12/09/1999 15:04:12 (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 - -
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.