From db0eba9aa83432cbf9e05f5b1fe1452bbdaa203f Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Mon, 12 Jun 2017 18:50:04 -0400 Subject: [PATCH] commit bash-snap-20170612 snapshot --- CWRU/CWRU.chlog | 7 +++++++ builtins/read.def | 2 +- jobs.c | 9 ++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 01a46904..7abee607 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -14047,3 +14047,10 @@ lib/readline/mbutil.c - _rl_get_char_len: use MB_CUR_MAX in the call to mbrlen; there's no need to look at the rest of the string when we're just interested in the length of a single character + + 6/12 + ---- +jobs.c + - wait_for: when waiting for the next child to exit (ANY_PID), make + sure to restore the old SIGINT handler before returning. Fixes + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864649 diff --git a/builtins/read.def b/builtins/read.def index 99c896fe..520a2b34 100644 --- a/builtins/read.def +++ b/builtins/read.def @@ -386,7 +386,7 @@ read_builtin (list) sync_buffered_stream (default_buffered_input); #endif -#if 0 +#if 1 input_is_tty = isatty (fd); #else input_is_tty = 1; diff --git a/jobs.c b/jobs.c index b320b22f..b8aeffe6 100644 --- a/jobs.c +++ b/jobs.c @@ -2826,9 +2826,12 @@ itrace("wait_for: blocking wait for %d returns %d child = %p", (int)pid, r, chil CHECK_WAIT_INTR; if (pid == ANY_PID) - /* XXX - could set child but we don't have a handle on what waitchld - reaps. Leave termination_state alone. */ - goto wait_for_return; + { + /* XXX - could set child but we don't have a handle on what waitchld + reaps. Leave termination_state alone. */ + restore_sigint_handler (); + goto wait_for_return; + } } while (PRUNNING (child) || (job != NO_JOB && RUNNING (job)));