From 650309160904b13ad2e890dcba859425c296c8f82ba12db2396a3b7f98d094d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 1 Sep 2015 19:00:44 +0000 Subject: [PATCH] - Add read1char_signals.patch to fix workers/36373 OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=160 --- read1char_signals.patch | 28 ++++++++++++++++++++++++++++ zsh.changes | 5 +++++ zsh.spec | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 read1char_signals.patch diff --git a/read1char_signals.patch b/read1char_signals.patch new file mode 100644 index 0000000..1ac6719 --- /dev/null +++ b/read1char_signals.patch @@ -0,0 +1,28 @@ +commit 3747f6b6ab20ac9082909dd0cb3376e4e35f2c6c +Author: Barton E. Schaefer +Date: Tue Sep 1 11:26:06 2015 -0700 + + 36376: handle signals during read1char() so it is possible to interrupt correct/correctall prompts + +diff --git a/Src/utils.c b/Src/utils.c +index 4c4dc55..90f7c33 100644 +--- a/Src/utils.c ++++ b/Src/utils.c +@@ -2538,11 +2538,16 @@ static int + read1char(int echo) + { + char c; ++ int q = queue_signal_level(); + ++ dont_queue_signals(); + while (read(SHTTY, &c, 1) != 1) { +- if (errno != EINTR || errflag || retflag || breaks || contflag) ++ if (errno != EINTR || errflag || retflag || breaks || contflag) { ++ restore_queue_signals(q); + return -1; ++ } + } ++ restore_queue_signals(q); + if (echo) + write_loop(SHTTY, &c, 1); + return STOUC(c); diff --git a/zsh.changes b/zsh.changes index d9e484e..22f428c 100644 --- a/zsh.changes +++ b/zsh.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 1 18:57:20 UTC 2015 - idonmez@suse.com + +- Add read1char_signals.patch to fix workers/36373 + ------------------------------------------------------------------- Tue Sep 1 06:36:57 UTC 2015 - idonmez@suse.com diff --git a/zsh.spec b/zsh.spec index 4c1d243..01794ff 100644 --- a/zsh.spec +++ b/zsh.spec @@ -39,6 +39,7 @@ Source17: zshprompt.pl Patch1: trim-unneeded-completions.patch # PATCH-FIX-OPENSUSE zsh-osc-completion.patch -- Fix openSUSE versions in osc completion Patch2: zsh-osc-completion.patch +Patch3: read1char_signals.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} Requires(pre): %{install_info_prereq} @@ -98,6 +99,7 @@ This package contains the Zsh manual in html format. %patch1 -p1 %endif %patch2 -p1 +%patch3 -p1 # Remove executable bit chmod 0644 Etc/changelog2html.pl