Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: cpio WARNING



Scott Stone did state upon Mon, Oct 26, 1998 at 05:10:47PM +0900:
> On Mon, 26 Oct 1998, Scott Perlman wrote:
> 
> > Please, do NOT exit(0)
> > 
> > Ayone depending on cpio -c for a backup mechanism will happily use the
> > scripts they have gotten debugged and working forever, and as cpio
> > succeeds will not know things went wrong.
> > 
> > Give an exit code that makes more sense.
> > 
> > (also make sure tyou print to STDERR not STDOUT)
> 
> Good points all, thanks.  exit(1) is probably better.

My pleasure.

I don't know enough about cpio to know if its error codes generally are
informative.

If so you'll want to pick a new code.

At least in my perl I tend to define 
$NO_FILE=1;
$BAD_SYNTAX=2;
$USAGE=3;

And then ' exit $BAD_SYNTAX ' upon  afailed config file
or whatnot.

-Scott

-- 
I don't know if there is method to my madness or madness to my method,
BUT you can bet your life there's madness in there somewhere!!
=====perlman@example.com  
---------------------------------------------------------------
Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Technical Meeting: January, 1999 (details TBA)
---------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links