GNU bug report logs -
#32815
Corrective patch for GNU gzip
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello all,
the manual page of GNU gzip says:
------------------------------DIAGNOSTICS Exit status is normally 0; if an error occurs, exit status is 1. If a warning occurs, exit status is 2.------------------------------
This is not the case sind version >1.5 for the situation when the source file already ends with .gz
Test:
$ gzip 2018.gzgzip: 2018.gz already has .gz suffix -- unchanged$ echo $?0
Following the patch for it:
diff --git a/gzip.c b/gzip.cindex e6a7761..bf3eb0a 100644--- a/gzip.c+++ b/gzip.c@@ -1417,8 +1417,8 @@ local int make_ofname() /* Avoid annoying messages with -r (see treat_dir()) */ if (verbose || (!recursive && !quiet)) { /* Don't use WARN, as it affects exit status. */- fprintf (stderr, "%s: %s already has %s suffix -- unchanged\n",- program_name, ifname, suff);+ WARN ((stderr, "%s: %s already has %s suffix -- unchanged\n",+ program_name, ifname, suff)); } return WARNING; } else {
Test:
$ gzip 2018.gzgzip: 2018.gz already has .gz suffix -- unchanged$ echo $?2
Best regards,Manfred
[Message part 2 (text/html, inline)]
This bug report was last modified 3 years and 58 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.