]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Signal-handling cleanup motivated by core dumps in dd.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Apr 2005 05:00:40 +0000 (05:00 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Apr 2005 05:00:40 +0000 (05:00 +0000)
ChangeLog
doc/ChangeLog
lib/ChangeLog
m4/ChangeLog

index bda37cb314c0d651f6ec3c26914c80944af7d97e..1d85ab2cd28bcb7ced6ebb97c7c6b305ef2cff73 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,62 @@
-2005-04-07  Jim Meyering  <jim@meyering.net>
+2005-04-08  Paul Eggert  <eggert@cs.ucla.edu>
 
        * Version 5.3.1.
 
+       * NEWS: Document that dd no longer treats QUIT or PIPE specially,
+       and when conforming to POSIX no longer treats USR1 specially.
+       Document that dd no longer dumps core when handling signals.
+       * src/system.h (RETSIGTYPE): Remove; no longer needed.  All uses
+       replaced with void.
+       * src/csplit.c (SA_NOCLDSTOP): Define to 0 if not defined.
+       All uses changed.
+       (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
+       (delete_all_files): New arg IN_SIGNAL_HANDLER, to avoid undefined
+       behavior when called from a signal handler.  All uses changed.
+       (main) [!defined SA_NOCLDSTOP]:
+       Use siginterrupt to specify that system calls should be interrupted.
+       * src/dd.c: Do not include safe-read.h or full-write; no longer needed.
+       (process_signals): Add forward decl.
+       (SA_NOCLDSTOP, sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]:
+       New macros.
+       (siginterrupt) [! HAVE_SIGINTERRUPT]: New macro.
+       (SA_NODEFER) [!defined SA_NODEFER]: New macro.
+       (SA_RESETHAND) [!defined SA_RESETHAND]: New macro.
+       (caught_signals, interrupt_signal, info_signal_count, catch_siginfo):
+       New vars.
+       (usage): Mention -USR1 versus -INFO.
+       (cleanup): Don't invoke print_stats; the caller must do it now.
+       All callers changed.
+       (quit): Process signals just before exiting.
+       (interrupt_handler): Simply record the signal and return.
+       (siginfo_handler): Simply increment the signal counter and return.
+       (install_handler): Remove, replacing with:
+       (install_signal_handlers, process_signals, iread, iwrite):
+       New functions.  All callers to safe_read and full_write replaced
+       by iread and iwrite.  All callers to install_handler replaced by
+       install_handlers.
+       * src/ls.c (SA_NOCLDSTOP): Define to 0 if not defined.
+       All uses changed.
+       (siginterrupt) [! HAVE_SIGINTERRUPT]: New macro.
+       (main) [! SA_NOCLDSTOP]: Use it.
+       * src/shred.c: Remove all uses of signals; modern hosts have
+       /dev/random and don't need this gorp.
+       Do not include signal.h.
+       (env, sigill_handler, isaac_seed_machdep): Remove.  All uses removed.
+       * src/sort.c (SA_NOCLDSTOP): Define to 0 if not defined.
+       All uses changed.
+       (siginterrupt) [! HAVE_SIGINTERRUPT]: New macro.
+       (main) [! SA_NOCLDSTOP]: Use it.
+
+       * src/dd.c: Do not include inttostr.h, no longer needed.
+       (print_stats, main): Rewrite and simplify formats to use PRIuMAX
+       instead of umaxtostr.
+       (print_stats): Work even in languages that have special
+       forms for two of things, for r_truncate and w_bytes.  We can't
+       fix delta_s in this way, since ngettext doesn't support floating-point.
+       (main): Rewrite to avoid casts.
+
+2005-04-07  Jim Meyering  <jim@meyering.net>
+
        Placate gcc-4's -Wuninitialized.
        * src/md5sum.c (digest_check) [lint]: Initialize hex_digest to NULL.
        * src/test.c (binary_operator) [lint]: Initialize lt and rt to 0.
 
        * src/nice.c (NZERO) [NZERO == 0]: Undefine and define to 20,
        to work around the invalid definition from Darwin 7.7.0.
-       Test failure reported by Sébastien Maret.
+       Test failure reported by Sébastien Maret.
 
 2005-02-14  Paul Eggert  <eggert@cs.ucla.edu>
 
index a5227f00e8f0d60928e547a66739f5035556490b..2dd454683443a0f26cbd433741b3f74a7566a136 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * coreutils.texi (dd invocation): Document the distinction between
+       INFO and USR1 for dd, and the effect of POSIXLY_CORRECT here.
+
 2005-04-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        * doc/coreutils.texi (cat invocation, chown invocation)
index b049757130d285fcdca57fc91c887434faaeca0e..787cb7017e3e8ee3a3ab11e839da158760ecbf78 100644 (file)
@@ -1,3 +1,14 @@
+2005-04-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
+       that might redefine system include files.
+       (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
+       (my_usleep): Use NULL rather than (void *) 0.
+       (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
+       Use siginterrupt to specify that system calls should be interrupted.
+       (rpl_nanosleep): Move initialization of suspended closer to call of
+       my_usleep.
+
 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        * getdate.y (parser_control): rels_seen is now a boolean, not a
index d20ae26ee1177af5912d7c74f252770ad334bad9..786ae48d88774858df8645ed896a412010f2ba48 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * jm-macros.m4 (gl_MACROS): Check for siginterrupt.
+       * nanosleep.m4 (gl_PREREQ_NANOSLEEP): Likewise.
+       * jm-macros.m4 (gl_CHECK_ALL_TYPES): Do not require AC_TYPE_SIGNAL.
+
 2005-03-30  Paul Eggert  <eggert@cs.ucla.edu>
 
        * readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.