From 3b530b728b982c7bc41a8b8337d0abee13cf835e Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 19 Apr 2018 12:34:09 +0000 Subject: [PATCH] fix bug bsc#1086247 OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=261 --- bash-4.4-wait-sigint-handler.patch | 29 +++++++++++++++++++++++++++++ bash.changes | 7 +++++++ bash.spec | 3 +++ 3 files changed, 39 insertions(+) create mode 100644 bash-4.4-wait-sigint-handler.patch diff --git a/bash-4.4-wait-sigint-handler.patch b/bash-4.4-wait-sigint-handler.patch new file mode 100644 index 00000000..fd54eeaa --- /dev/null +++ b/bash-4.4-wait-sigint-handler.patch @@ -0,0 +1,29 @@ +Repeating self-calling of traps due the combination of a non-interactive +shell, a trap handler for SIGINT, an external process in the trap handler, +and a SIGINT within the trap after the external process runs. + +--- + jobs.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- jobs.c ++++ jobs.c 2018-04-02 18:24:21.000000000 +0000 +@@ -2662,7 +2662,17 @@ wait_for (pid) + wait_sigint_received = child_caught_sigint = 0; + if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB)) + { +- old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); ++ SigHandler *temp_sigint_handler; ++ ++ temp_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); ++ if (temp_sigint_handler == wait_sigint_handler) ++ { ++#if defined (DEBUG) ++ internal_warning ("wait_for: recursively setting old_sigint_handler to wait_sigint_handler: running_trap = %d", running_trap); ++#endif ++ } ++ else ++ old_sigint_handler = temp_sigint_handler; + waiting_for_child = 0; + if (old_sigint_handler == SIG_IGN) + set_signal_handler (SIGINT, old_sigint_handler); diff --git a/bash.changes b/bash.changes index fbc5a5d1..15c990ed 100644 --- a/bash.changes +++ b/bash.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 18 10:49:26 UTC 2018 - werner@suse.de + +- Add patch bash-4.4-wait-sigint-handler.patch to fix bug bsc#1086247 + that is repeating self inserting trap due external command in the + trap. + ------------------------------------------------------------------- Fri Mar 16 17:37:08 UTC 2018 - werner@suse.de diff --git a/bash.spec b/bash.spec index e6b497a5..eb77002b 100644 --- a/bash.spec +++ b/bash.spec @@ -85,6 +85,8 @@ Patch47: bash-4.3-perl522.patch Patch48: bash-4.3-extra-import-func.patch # PATCH-EXTEND-SUSE Allow root to clean file system if filled up Patch49: bash-4.3-pathtemp.patch +# PATCH-FIX-UPSTREAM bnc#1086247 +Patch50: bash-4.4-wait-sigint-handler.patch %global _sysconfdir /etc %global _incdir %{_includedir} %global _ldldir /%{_lib}/bash @@ -226,6 +228,7 @@ done %patch48 -b .eif %endif %patch49 -p0 -b .pthtmp +%patch50 -p0 -b .trap %patch0 -p0 -b .0 # This has to be always the same version as included in the bash its self rl1=($(sed -rn '/RL_READLINE_VERSION/p' lib/readline/readline.h))