Paul Eggert wrote:
If you look at the gzip source code you'll
find a number of circumstances that will
cause it to exit with status 2, as a warning.

Then gzip's API differs from compress's API[1] (return 2 only if size increases and -f is not specified), and from "standard" API (only 0 means success).

[1]http://pubs.opengroup.org/onlinepubs/9699919799/utilities/compress.html

    The following exit values shall be returned:
     0  Successful completion.
     1  An error occurred.
2 One or more files were not compressed because they would have increased in size (and the -f option was not specified).
    >2  An error occurred.


This API isn't likely to change any time soon,
I'm afraid, as gzip is fairly frozen.

This is unfortunate because as quirks accumulate in GNU tar to accomodate the quirks of other programs it will become more bloated and more difficult to use. In short, less convenient for the user.

It really takes a tough man to make a tender chicken. :-(


Best regards,
Antonio.

Reply via email to