about summary refs log tree commit diff
path: root/Src/text.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-02-20 18:45:36 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2015-02-20 18:45:36 -0800
commita4ff8e69570cbdb8e7d5bf1d5cc4000ffe63e15e (patch)
treec4a880ad9be1ccc491a6fbe12bb2d2b9afe312f6 /Src/text.c
parentb237ba0a8eaa5001283ac8448872021723b90aff (diff)
downloadzsh-a4ff8e69570cbdb8e7d5bf1d5cc4000ffe63e15e.tar.gz
zsh-a4ff8e69570cbdb8e7d5bf1d5cc4000ffe63e15e.tar.xz
zsh-a4ff8e69570cbdb8e7d5bf1d5cc4000ffe63e15e.zip
34590: queue_signals() around more scopes that manipulate global state
Diffstat (limited to 'Src/text.c')
-rw-r--r--Src/text.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/Src/text.c b/Src/text.c
index 75f642c12..b58c2516d 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -173,6 +173,8 @@ getpermtext(Eprog prog, Wordcode c, int start_indent)
 {
     struct estate s;
 
+    queue_signals();
+
     if (!c)
 	c = prog->prog;
 
@@ -193,6 +195,9 @@ getpermtext(Eprog prog, Wordcode c, int start_indent)
     *tptr = '\0';
     freeeprog(prog);		/* mark as unused */
     untokenize(tbuf);
+
+    unqueue_signals();
+
     return tbuf;
 }
 
@@ -206,6 +211,8 @@ getjobtext(Eprog prog, Wordcode c)
 
     struct estate s;
 
+    queue_signals();
+
     if (!c)
 	c = prog->prog;
 
@@ -224,6 +231,9 @@ getjobtext(Eprog prog, Wordcode c)
     *tptr = '\0';
     freeeprog(prog);		/* mark as unused */
     untokenize(jbuf);
+
+    unqueue_signals();
+
     return jbuf;
 }
 
@@ -883,6 +893,9 @@ getredirs(LinkList redirs)
 	">", ">|", ">>", ">>|", "&>", "&>|", "&>>", "&>>|", "<>", "<",
 	"<<", "<<-", "<<<", "<&", ">&", NULL /* >&- */, "<", ">"
     };
+
+    queue_signals();
+
     taddchr(' ');
     for (n = firstnode(redirs); n; incnode(n)) {
 	Redir f = (Redir) getdata(n);
@@ -970,4 +983,6 @@ getredirs(LinkList redirs)
 	}
     }
     tptr--;
+
+    unqueue_signals();
 }