summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-08-06 14:44:41 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-08-06 14:45:34 -0700
commit30ba4a2b69e5ee34c3fcde12f275f80d1fbe8a59 (patch)
tree43fdc9cde594e56edf8f29787d1d9e6d9e6cd629 /m4
parent1252d056feaf71e7488cbaa5a78b3d45cd77f877 (diff)
downloadgzip-30ba4a2b69e5ee34c3fcde12f275f80d1fbe8a59.tar.gz
Fix some theoretical races in signal handling
Problem reported by Johannes Przybilla (Bug#32375). * NEWS: Mention this. * bootstrap.conf (gnulib_modules): Add sigaction. * gzip.c (SA_NOCLDSTOP, sigprocmask, sigset_t) (siginterrupt) [!SA_NOCLDSTOP]: Remove; Gnulib not supplies these. (remove_ofname): New var. (volatile_strcpy): New function. (create_outfile): Use it. (install_signal_handlers, abort_gzip_signal): Assume sigaction. (remove_output_file): New arg SIGNALS_ALREADY_BLOCKED. All uses changed. Avoid unnecessary (and racy) call to sigprocmask if this new arg is set. (abort_gzip_signal): Assume C89 or better for signal handler type. * gzip.h (RETSIGTYPE): Remove. * lib/.gitignore, m4/.gitignore: Add files brought in by Gnulib sigaction module. Sort.
Diffstat (limited to 'm4')
-rw-r--r--m4/.gitignore10
1 files changed, 7 insertions, 3 deletions
diff --git a/m4/.gitignore b/m4/.gitignore
index 5ce3776..7f5c059 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -58,6 +58,7 @@
/gnulib-common.m4
/gnulib-comp.m4
/gnulib-tool.m4
+/host-cpu-c-abi.m4
/include_next.m4
/intmax_t.m4
/inttypes_h.m4
@@ -102,11 +103,15 @@
/printf-posix-rpl.m4
/printf.m4
/pthread_rwlock_rdlock.m4
+/raise.m4
/readdir.m4
/realloc.m4
/rmdir.m4
/save-cwd.m4
/savedir.m4
+/sigaction.m4
+/signal_h.m4
+/signalblocking.m4
/signbit.m4
/size_max.m4
/ssize_t.m4
@@ -118,6 +123,7 @@
/stdint_h.m4
/stdio_h.m4
/stdlib_h.m4
+/stdnoreturn.m4
/stpcpy.m4
/strdup.m4
/strerror.m4
@@ -147,7 +153,5 @@
/wint_t.m4
/xalloc.m4
/xsize.m4
-/yesno.m4
-/host-cpu-c-abi.m4
/year2038.m4
-/stdnoreturn.m4
+/yesno.m4