+gzip (1.3.5-12) unstable; urgency=low
+
+ * merge patch from Matt Zimmerman for futex hang due to improper signal
+ handling, closes: #310053, #315612
+ * merge patch to add --rsyncable to the man page, closes: #289616, #295721
+ * don't return failing result code on harmless warning, closes: #169669
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 11 Jul 2005 22:10:51 +0300
+
gzip (1.3.5-11) unstable; urgency=low
* patch from Peter Samuelson for bashism in zgrep,
.I gunzip
).
.TP
+.B --rsyncable
+While compressing, synchronize the output occasionally based on the input.
+This increases size by less than 1 percent most cases, but means that the
+.BR rsync (1)
+program can much more efficiently syncronize files compressed with this flag.
+.I gunzip
+cannot tell the difference between a compressed file created with this option,
+and one created without it.
+.TP
.B \-S .suf --suffix .suf
Use suffix .suf instead of .gz. Any suffix can be given, but suffixes
other than .z and .gz should be avoided to avoid confusion when files
foreground = signal(SIGINT, SIG_IGN) != SIG_IGN;
if (foreground) {
- (void) signal (SIGINT, (sig_type)abort_gzip);
+ (void) signal (SIGINT, (sig_type)abort_gzip_signal);
}
#ifdef SIGTERM
if (signal(SIGTERM, SIG_IGN) != SIG_IGN) {
- (void) signal(SIGTERM, (sig_type)abort_gzip);
+ (void) signal(SIGTERM, (sig_type)abort_gzip_signal);
}
#endif
#ifdef SIGHUP
if (signal(SIGHUP, SIG_IGN) != SIG_IGN) {
- (void) signal(SIGHUP, (sig_type)abort_gzip);
+ (void) signal(SIGHUP, (sig_type)abort_gzip_signal);
}
#endif
#ifdef SIGPIPE
/* Ignore "Broken Pipe" message with --quiet */
if (quiet && signal (SIGPIPE, SIG_IGN) != SIG_IGN)
- signal (SIGPIPE, (sig_type) abort_gzip);
+ signal (SIGPIPE, (sig_type) abort_gzip_signal);
#endif
/* By default, save name and timestamp on compression but do not
} else if (suff != NULL) {
/* Avoid annoying messages with -r (see treat_dir()) */
if (verbose || (!recursive && !quiet)) {
- WARN((stderr, "%s: %s already has %s suffix -- unchanged\n",
- progname, ifname, suff));
+ /* don't use WARN -- it will cause an exit_code of 2 */
+ fprintf(stderr, "%s: %s already has %s suffix -- unchanged\n",
+ progname, ifname, suff);
}
return WARNING;
} else {
}
/* ========================================================================
- * Signal and error handler.
+ * Close and unlink the output file if appropriate. This routine must be
+ * async-signal-safe.
*/
-RETSIGTYPE abort_gzip()
-{
+local void do_remove() {
if (remove_ofname) {
close(ofd);
xunlink (ofname);
}
- do_exit(ERROR);
}
+
+/* ========================================================================
+ * Error handler.
+ */
+RETSIGTYPE abort_gzip()
+{
+ do_remove();
+ do_exit(ERROR);
+}
+
+/* ========================================================================
+ * Signal handler.
+ */
+RETSIGTYPE abort_gzip_signal()
+{
+ do_remove();
+ _exit(ERROR);
+}
+