bug-cvs
[Top][All Lists]
Advanced

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

Re: cvs questions...


From: Donald Sharp
Subject: Re: cvs questions...
Date: Fri, 1 Dec 2000 12:44:14 -0500
User-agent: Mutt/1.2.4i

On Fri, Dec 01, 2000 at 11:58:43AM -0500, Derek R. Price wrote:
<snip>
> > Ok -
> >
> >         I'll change my arguement then ;).  How about making cvs diff return
> > 0 - Files were different or Files were same.
> > 1 - Some sort of error occurred.
> >
> > As it currently stands when files are different it is returning a '1'
> > which is implying a failure.
> >
> > Or how about we put code in there that determines if we are on a
> > system that only allows '0' or '1' and forcing all exit()'s to
> > be either a '0' or '1', else return what was returned from the
> > subcommand.
> >
> > pseudo code:
> >
> > void _exit( int status )
> > {
> > #ifdef LIMITED_EXIT_CODES
> >         status = status ? EXIT_FAILURE : 0;
> > #endif
> >
> >         exit( status );
> > }
> 
> I'm for a combination of those two solutions.  Return a proper diff error 
> code on systems
> that can handle it and 0 for different or same and 1 for errors on other 
> systems.  This
> does mean that ERROR_EXIT will have to be redefined to 2 or greater on 
> systems which can
> handle it, which should be easy enough for existing scripts to deal with, 
> perhaps with

I like it ;)

> minor fixes.  Any objection to ERROR_EXIT = 119 (Linux BASH defines 127 to 
> "command not
> found", 126 to "command found but not executable" & 128+N to "command 
> terminated on fatal
> signal N" and I thought I'd leave them a little extra room for expansion)?  
> I'd probably

Sounds good to me....

> add in the BASH builtin default of 2 meaning improper usage, too, just for 
> kicks.  A
> system's possible error codes should be easy to discover with configure.  I'd 
> even do
> half the work on this if you don't want to since I think I know where all the 
> code pieces
> should go, assuming you were telling the truth about diff in diff.c returning 
> the correct
> code, but you do the docs and test cases.  :)

sure ;)

donald
> 
> diff is defined in SUSV7 as returning '2' specifically for trouble, not >=2.  
> Same goes
> for both diff & diff3 under Linux 2.2.X.  Not sure that's relevant, but 
> something to
> consider.
> 
> cc'd bug-cvs for comments.
> 
> Derek
> 
> --
> Derek Price                      CVS Solutions Architect ( http://CVSHome.org 
> )
> mailto:address@hidden     OpenAvenue ( http://OpenAvenue.com )
> --
> Confucius say, "Man who live in glass house dress in basement."
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]