about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-11-06 10:50:20 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2014-11-06 10:50:20 -0800
commit7abd611a2396bad9d93d18681a2c59cb1ea0e158 (patch)
tree4583f98eb9a695015fb3faba1af8ffd8b7074d6c /Src/exec.c
parentc7ff843ecf60ab74ce98929e45029b1aef5014e1 (diff)
downloadzsh-7abd611a2396bad9d93d18681a2c59cb1ea0e158.tar.gz
zsh-7abd611a2396bad9d93d18681a2c59cb1ea0e158.tar.xz
zsh-7abd611a2396bad9d93d18681a2c59cb1ea0e158.zip
33614 (based on RedHat BZ-978613): signal safety when updating global state in execshfunc()
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c6
1 files changed, 6 insertions, 0 deletions
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();
 }
 
 /*