summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-04-24 08:04:20 +0000
committerJim Meyering <jim@meyering.net>2004-04-24 08:04:20 +0000
commit9ba449c94b705b9be8e97ed8d2c7f48d2fcd6944 (patch)
treed31460056c824ba82b07177cf0dd9aff2ee30bac /ChangeLog
parent58e4afaacf36b357f5bd5f83be80f7c1ce4e0858 (diff)
downloadcoreutils-9ba449c94b705b9be8e97ed8d2c7f48d2fcd6944.tar.xz
*** empty log message ***
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog40
1 files changed, 40 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 418281a81..b4d6ad79c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2004-04-22 Paul Eggert <eggert@twinsun.com>
+
+ More signal-handling cleanup for ls.c. Do not allow signals to
+ happen between arbitrary output bytes, as the
+ restore-default-color sequence can bollix up multibyte chars or
+ color-change sequences in the ordinary output. Instead, process
+ signals only between printing a file name and changing the color
+ back to non_filename_text color. That way, if the signal handler
+ changes the color (to the default), 'ls' will change it back when
+ 'ls' continues (after being suspended).
+
+ Also, do not bother with signal-handling unless stdout is a
+ controlling terminal; this lets stdio buffer better when "ls
+ --color" is piped or sent to a file.
+
+ * src/ls.c (sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]: New macros.
+ Do not include "full-write.h"; no longer needed.
+ (tcgetpgrp) [! HAVE_TCGETPGRP]: New macro.
+ (put_indicator_direct): Remove. All callers changed to use
+ put_indicator.
+ (caught_signals, interrupt_signal, stop_signal_count): New vars.
+ (restore_default_color): Don't bother checking for put_indicator
+ failure.
+ (sighandler): Don't handle SIGTSTP; that's another handler now.
+ Simply set interrupt_signal to the signal, then exit.
+ (stophandler, process_signals): New functions.
+ (main): Don't output any color changes until _after_ the signal
+ handlers are set up. This fixes a race condition where 'ls'
+ could be interrupted while initializing colors, and leaving the
+ terminal in an undesirable state.
+ Don't mess with signal-handling if standard output is not a
+ controlling terminal.
+ When exiting, restore the default color, then restore the
+ default signal handling, then act on any signals that weren't
+ acted on yet.
+ Do not print //DIRED// etc. in colors; this avoids the need
+ to catch signals when printing them.
+ (print_name_with_quoting): Process signals just before switching
+ color back to non_filename_text.
+
2004-04-23 Jim Meyering <jim@meyering.net>
Avoid segfault on systems for which SIZE_MAX != (size_t) -1.