summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/computil.c1
-rw-r--r--Src/Zle/zle_main.c1
-rw-r--r--Src/builtin.c3
-rw-r--r--Src/exec.c3
-rw-r--r--Src/hist.c1
-rw-r--r--Src/init.c4
-rw-r--r--Src/mem.c8
-rw-r--r--Src/module.c1
-rw-r--r--Src/params.c2
-rw-r--r--Src/prompt.c4
11 files changed, 29 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a1c4e60e3..a68dfaf59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2016-10-03  Peter Stephenson  <p.stephenson@samsung.com>
 
+	* 39545: Src/builtin.c, Src/exec.c, Src/hist.c, Src/init.c,
+	Src/mem.c, Src/module.c, Src/params.c, Src/prompt.c,
+	Src/Zle/computil.c, Src/Zle/zle_main.c: Add some missing
+	unqueue_signals().
+
 	* 39521: Src/exec.c, Src/zsh.h, Test/A01grammar.ztst: Refactor
 	start of execcmd().  This allows execpline2() easier access to
 	the state at the start of execuation.
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 27b78cd61..e9bad1cab 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -4865,6 +4865,7 @@ bin_compfiles(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
 	    }
 	    queue_signals();
 	    if (!(tmp = getaparam(args[1]))) {
+		unqueue_signals();
 		zwarnnam(nam, "unknown parameter: %s", args[1]);
 		return 0;
 	    }
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 0bdd82ba4..0b3b1fcf4 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1631,6 +1631,7 @@ bin_vared(char *name, char **args, Options ops, UNUSED(int func))
 	return 1;
     } else if (v) {
 	if (*s) {
+	    unqueue_signals();
 	    zwarnnam(name, "not an identifier: `%s'", args[0]);
 	    return 1;
 	}
diff --git a/Src/builtin.c b/Src/builtin.c
index 60dc07f25..a274ff791 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -1489,6 +1489,7 @@ bin_fc(char *nam, char **argv, Options ops, int func)
     }
 
     if (zleactive) {
+	unqueue_signals();
 	zwarnnam(nam, "no interactive history within ZLE");
 	return 1;
     }
@@ -2808,6 +2809,7 @@ bin_typeset(char *name, char **argv, LinkList assigns, Options ops, int func)
 	return 0;
     }
     if (off & PM_TIED) {
+	unqueue_signals();
 	zerrnam(name, "use unset to remove tied variables");
 	return 1;
     }
@@ -3138,6 +3140,7 @@ bin_functions(char *name, char **argv, Options ops, int func)
 	    queue_signals();
 	    for (q = mathfuncs; q; q = q->next) {
 		if (!strcmp(q->name, funcname)) {
+		    unqueue_signals();
 		    zwarnnam(name, "-M %s: function already exists",
 			     funcname);
 		    zsfree(p->name);
diff --git a/Src/exec.c b/Src/exec.c
index a4294288b..9890286b2 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1795,6 +1795,8 @@ execpline(Estate state, wordcode slcode, int how, int last1)
 		deletejob(jn, 0);
 	    thisjob = pj;
 	}
+	else
+	    unqueue_signals();
 	if ((slflags & WC_SUBLIST_NOT) && !errflag)
 	    lastval = !lastval;
     }
@@ -5556,6 +5558,7 @@ runshfunc(Eprog prog, FuncWrap wrap, char *name)
 	if (!cont) {
 	    if (ou)
 		zfree(ou, ouu);
+	    unqueue_signals();
 	    return;
 	}
 	wrap = wrap->next;
diff --git a/Src/hist.c b/Src/hist.c
index 5fc40bd67..eebd7dcde 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -653,6 +653,7 @@ histsubchar(int c)
 		(c == '}' ||  c == ';' || c == '\'' || c == '"' || c == '`')) {
 	      /* Neither event nor word designator, no expansion */
 	      safeinungetc(c);
+	      unqueue_signals();
 	      return bangchar;
 	    }
 	    *ptr = 0;
diff --git a/Src/init.c b/Src/init.c
index 3dea179b9..c12043b88 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1442,8 +1442,10 @@ sourcehome(char *s)
     queue_signals();
     if (EMULATION(EMULATE_SH|EMULATE_KSH) || !(h = getsparam_u("ZDOTDIR"))) {
 	h = home;
-	if (!h)
+	if (!h) {
+	    unqueue_signals();
 	    return;
+	}
     }
 
     {
diff --git a/Src/mem.c b/Src/mem.c
index 021dad573..db311efbd 100644
--- a/Src/mem.c
+++ b/Src/mem.c
@@ -903,11 +903,15 @@ memory_validate(Heapid heap_id)
 
     queue_signals();
     for (h = heaps; h; h = h->next) {
-	if (h->heap_id == heap_id)
+	if (h->heap_id == heap_id) {
+	    unqueue_signals();
 	    return 0;
+	}
 	for (hs = heaps->sp; hs; hs = hs->next) {
-	    if (hs->heap_id == heap_id)
+	    if (hs->heap_id == heap_id) {
+		unqueue_signals();
 		return 0;
+	    }
 	}
     }
 
diff --git a/Src/module.c b/Src/module.c
index 46a7d7746..41f142adb 100644
--- a/Src/module.c
+++ b/Src/module.c
@@ -2242,6 +2242,7 @@ load_module(char const *name, Feature_enables enablesarr, int silent)
 	return 0;
     }
     if (m->node.flags & MOD_BUSY) {
+	unqueue_signals();
 	zerr("circular dependencies for module ;%s", name);
 	return 1;
     }
diff --git a/Src/params.c b/Src/params.c
index e11510246..1418021aa 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -2803,6 +2803,7 @@ assignsparam(char *s, char *val, int flags)
 		zerr("read-only variable: %s", v->pm->node.nam);
 		*ss = '[';
 		zsfree(val);
+		unqueue_signals();
 		return NULL;
 	    }
 	    flags &= ~ASSPM_WARN_CREATE;
@@ -3117,6 +3118,7 @@ setnparam(char *s, mnumber val)
 	if (!(v = getvalue(&vbuf, &t, 1))) {
 	    DPUTS(!v, "BUG: value not found for new parameter");
 	    /* errflag |= ERRFLAG_ERROR; */
+	    unqueue_signals();
 	    return NULL;
 	}
 	if (!was_unset && isset(WARNCREATEGLOBAL) && locallevel > forklevel)
diff --git a/Src/prompt.c b/Src/prompt.c
index d4f389809..ee77c8bc8 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -491,8 +491,10 @@ putpromptchar(int doprint, int endchar, unsigned int *txtchangep)
 		if (!arg)
 		    arg++;
 		queue_signals();
-		if (!(hostnam = getsparam("HOST")))
+		if (!(hostnam = getsparam("HOST"))) {
+		    unqueue_signals();
 		    break;
+		}
 		if (arg < 0) {
 		    for (ss = hostnam + strlen(hostnam); ss > hostnam; ss--)
 			if (ss[-1] == '.' && !++arg)