summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/exec.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cb739d5a1..9c772c7d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-06 Barton E. Schaefer <schaefer@zsh.org>
+
+ * 33614 (based on RedHat BZ-978613): Src/exec.c: signal safety
+ when updating global state in execshfunc()
+
2014-11-05 Oliver Kiddle <opk@zsh.org>
* 33604: Src/Zle/zle_utils.c, Src/Zle/zle_vi.c, Test/X02zlevi.ztst:
diff --git a/Src/exec.c b/Src/exec.c
index d2d4e800b..042215d34 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4555,6 +4555,7 @@ execshfunc(Shfunc shf, LinkList args)
fputc('\n', xtrerr);
fflush(xtrerr);
}
+ queue_signals();
ocs = cmdstack;
ocsp = cmdsp;
cmdstack = (unsigned char *) zalloc(CMDSTACKSZ);
@@ -4562,7 +4563,11 @@ execshfunc(Shfunc shf, LinkList args)
if ((osfc = sfcontext) == SFC_NONE)
sfcontext = SFC_DIRECT;
xtrerr = stderr;
+ unqueue_signals();
+
doshfunc(shf, args, 0);
+
+ queue_signals();
sfcontext = osfc;
free(cmdstack);
cmdstack = ocs;
@@ -4570,6 +4575,7 @@ execshfunc(Shfunc shf, LinkList args)
if (!list_pipe)
deletefilelist(last_file_list, 0);
+ unqueue_signals();
}
/*