+gzip (1.3.5-10sarge1) stable; urgency=low
+
+ * merge patch from Matt Zimmerman for futex hang due to improper signal
+ handling, closes: #310053, #315612
+ * backport to stable since this problem affects several debian.org servers
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 8 Nov 2005 22:25:19 -0700
+
gzip (1.3.5-10) unstable; urgency=medium
* remove PAGER reference from zmore.1, closes: #263792
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
}
/* ========================================================================
- * 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);
+}
+
extern int unlzh OF((int in, int out));
/* in gzip.c */
-RETSIGTYPE abort_gzip OF((void));
+RETSIGTYPE abort_gzip_signal OF((void));
/* in deflate.c */
void lm_init OF((int pack_level, ush *flags));