39545: Add some missing unqueue_signals().

All of these are added simply to fit existing logic in other branches.
This commit is contained in:
Peter Stephenson 2016-10-03 13:43:20 +01:00
parent 36a11804b4
commit 4ab3fcc90d
11 changed files with 29 additions and 4 deletions

View File

@ -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.

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;
}
}
{

View File

@ -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;
}
}
}

View File

@ -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;
}

View File

@ -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)

View File

@ -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)