From 1d6adee8ed8a7a07770fba2d9c997ab662d27f99 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 10 Apr 2010 18:05:52 +0000 Subject: [PATCH] * fhandler_console.cc (fhandler_console::read): Default to sending CERASE character if termios VERASE field is zero. (fhandler_console::fixup_after_fork_exec): Avoid a spurious debug message. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/fhandler_console.cc | 16 +++------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 68ba98340..520d04560 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2010-04-10 Christopher Faylor + + * fhandler_console.cc (fhandler_console::read): Default to sending + CERASE character if termios VERASE field is zero. + (fhandler_console::fixup_after_fork_exec): Avoid a spurious debug + message. + 2010-04-10 Christopher Faylor * mkvers.sh: Use modern date formats to construct the date. diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index ed5ee72e0..1e1f691e9 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -377,7 +377,7 @@ fhandler_console::read (void *pv, size_t& buflen) /* Send the VERASE character from the terminal settings as backspace keycode. */ if (input_rec.Event.KeyEvent.wVirtualScanCode == 14) { - char c = ti.c_cc[VERASE]; + char c = ti.c_cc[VERASE] ?: CERASE; nread = 0; if (control_key_state & ALT_PRESSED) { if (dev_state->metabit) @@ -2120,20 +2120,10 @@ fhandler_console::fixup_after_fork_exec (bool execing) cygheap->manage_console_count ("fhandler_console::fixup_after_fork_exec", -1); else { - bool sawerr = false; if (!get_io_handle ()) - { - system_printf ("error opening input console handle for %s after fork/exec, errno %d, %E", get_name (), get_errno ()); - sawerr = true; - } + system_printf ("error opening input console handle for %s after fork/exec, errno %d, %E", get_name (), get_errno ()); if (!get_output_handle ()) - { - system_printf ("error opening output console handle for %s after fork/exec, errno %d, %E", get_name (), get_errno ()); - sawerr = true; - } - - if (!sawerr) - system_printf ("error opening console after fork/exec, errno %d, %E", get_errno ()); + system_printf ("error opening output console handle for %s after fork/exec, errno %d, %E", get_name (), get_errno ()); } if (!close_on_exec ())