bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: diff: suboptimal behaviour with errors


From: Thomas Schwinge
Subject: Re: diff: suboptimal behaviour with errors
Date: Sat, 27 Mar 2004 13:19:07 +0100
User-agent: Mutt/1.4.1i

On Sat, Mar 27, 2004 at 01:32:10AM -0800, Paul Eggert wrote:
> I think I'd rather continue to use '2' for unspecified trouble, and
> use other small integers greater than 2 for particular forms of
> trouble that need to be broken out.

Could you please give an example?
'0', '1', '2' for the same as they are now and '3' for 'processed OK,
but could not display all differences'?

> I wouldn't use numbers like 100  or 111.

I would do so since they separate exit codes of abnormal program
termination from the ones of normal program termination.
'111' is: 'Please try again later.'
'100' is: 'Please use valid command line arguments.' or
          'I am not allowed to access these files.'
'2'   is: 'Here we are: [output], but I was not able to process [...]
          for reasons you know about (i.e. binary files etc).'
'1'   is: 'Here we are: [output], everything's fine.'
'0'   is: Everything's fine.


> It does seem to me that other programs depend on the current 0/1/2
> behavior

Which programs did you find?
I'd say that it would be OK to change the exit codes. After all we're
talking about the development version of the diffutils.
The change would be announced for the next stable version - so that
should not be the problem IMHO.

> so it makes sense to enable the fine-grained error status
> codes only as an option.

Use that option to return the exit codes from the above table or use
that option to return '1' for non-displayable differences?
If we don't change the exit codes generally I'd go for the second.


Regards,
 Thomas




reply via email to

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