mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 16:50:58 +01:00
39545: Add some missing unqueue_signals().
All of these are added simply to fit existing logic in other branches.
This commit is contained in:
parent
36a11804b4
commit
4ab3fcc90d
11 changed files with 29 additions and 4 deletions
|
|
@ -1,5 +1,10 @@
|
||||||
2016-10-03 Peter Stephenson <p.stephenson@samsung.com>
|
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
|
* 39521: Src/exec.c, Src/zsh.h, Test/A01grammar.ztst: Refactor
|
||||||
start of execcmd(). This allows execpline2() easier access to
|
start of execcmd(). This allows execpline2() easier access to
|
||||||
the state at the start of execuation.
|
the state at the start of execuation.
|
||||||
|
|
|
||||||
|
|
@ -4865,6 +4865,7 @@ bin_compfiles(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
|
||||||
}
|
}
|
||||||
queue_signals();
|
queue_signals();
|
||||||
if (!(tmp = getaparam(args[1]))) {
|
if (!(tmp = getaparam(args[1]))) {
|
||||||
|
unqueue_signals();
|
||||||
zwarnnam(nam, "unknown parameter: %s", args[1]);
|
zwarnnam(nam, "unknown parameter: %s", args[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1631,6 +1631,7 @@ bin_vared(char *name, char **args, Options ops, UNUSED(int func))
|
||||||
return 1;
|
return 1;
|
||||||
} else if (v) {
|
} else if (v) {
|
||||||
if (*s) {
|
if (*s) {
|
||||||
|
unqueue_signals();
|
||||||
zwarnnam(name, "not an identifier: `%s'", args[0]);
|
zwarnnam(name, "not an identifier: `%s'", args[0]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1489,6 +1489,7 @@ bin_fc(char *nam, char **argv, Options ops, int func)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zleactive) {
|
if (zleactive) {
|
||||||
|
unqueue_signals();
|
||||||
zwarnnam(nam, "no interactive history within ZLE");
|
zwarnnam(nam, "no interactive history within ZLE");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
@ -2808,6 +2809,7 @@ bin_typeset(char *name, char **argv, LinkList assigns, Options ops, int func)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (off & PM_TIED) {
|
if (off & PM_TIED) {
|
||||||
|
unqueue_signals();
|
||||||
zerrnam(name, "use unset to remove tied variables");
|
zerrnam(name, "use unset to remove tied variables");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
@ -3138,6 +3140,7 @@ bin_functions(char *name, char **argv, Options ops, int func)
|
||||||
queue_signals();
|
queue_signals();
|
||||||
for (q = mathfuncs; q; q = q->next) {
|
for (q = mathfuncs; q; q = q->next) {
|
||||||
if (!strcmp(q->name, funcname)) {
|
if (!strcmp(q->name, funcname)) {
|
||||||
|
unqueue_signals();
|
||||||
zwarnnam(name, "-M %s: function already exists",
|
zwarnnam(name, "-M %s: function already exists",
|
||||||
funcname);
|
funcname);
|
||||||
zsfree(p->name);
|
zsfree(p->name);
|
||||||
|
|
|
||||||
|
|
@ -1795,6 +1795,8 @@ execpline(Estate state, wordcode slcode, int how, int last1)
|
||||||
deletejob(jn, 0);
|
deletejob(jn, 0);
|
||||||
thisjob = pj;
|
thisjob = pj;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
unqueue_signals();
|
||||||
if ((slflags & WC_SUBLIST_NOT) && !errflag)
|
if ((slflags & WC_SUBLIST_NOT) && !errflag)
|
||||||
lastval = !lastval;
|
lastval = !lastval;
|
||||||
}
|
}
|
||||||
|
|
@ -5556,6 +5558,7 @@ runshfunc(Eprog prog, FuncWrap wrap, char *name)
|
||||||
if (!cont) {
|
if (!cont) {
|
||||||
if (ou)
|
if (ou)
|
||||||
zfree(ou, ouu);
|
zfree(ou, ouu);
|
||||||
|
unqueue_signals();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wrap = wrap->next;
|
wrap = wrap->next;
|
||||||
|
|
|
||||||
|
|
@ -653,6 +653,7 @@ histsubchar(int c)
|
||||||
(c == '}' || c == ';' || c == '\'' || c == '"' || c == '`')) {
|
(c == '}' || c == ';' || c == '\'' || c == '"' || c == '`')) {
|
||||||
/* Neither event nor word designator, no expansion */
|
/* Neither event nor word designator, no expansion */
|
||||||
safeinungetc(c);
|
safeinungetc(c);
|
||||||
|
unqueue_signals();
|
||||||
return bangchar;
|
return bangchar;
|
||||||
}
|
}
|
||||||
*ptr = 0;
|
*ptr = 0;
|
||||||
|
|
|
||||||
|
|
@ -1442,9 +1442,11 @@ sourcehome(char *s)
|
||||||
queue_signals();
|
queue_signals();
|
||||||
if (EMULATION(EMULATE_SH|EMULATE_KSH) || !(h = getsparam_u("ZDOTDIR"))) {
|
if (EMULATION(EMULATE_SH|EMULATE_KSH) || !(h = getsparam_u("ZDOTDIR"))) {
|
||||||
h = home;
|
h = home;
|
||||||
if (!h)
|
if (!h) {
|
||||||
|
unqueue_signals();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
/* Let source() complain if path is too long */
|
/* Let source() complain if path is too long */
|
||||||
|
|
|
||||||
|
|
@ -903,13 +903,17 @@ memory_validate(Heapid heap_id)
|
||||||
|
|
||||||
queue_signals();
|
queue_signals();
|
||||||
for (h = heaps; h; h = h->next) {
|
for (h = heaps; h; h = h->next) {
|
||||||
if (h->heap_id == heap_id)
|
if (h->heap_id == heap_id) {
|
||||||
|
unqueue_signals();
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
for (hs = heaps->sp; hs; hs = hs->next) {
|
for (hs = heaps->sp; hs; hs = hs->next) {
|
||||||
if (hs->heap_id == heap_id)
|
if (hs->heap_id == heap_id) {
|
||||||
|
unqueue_signals();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (heaps_saved) {
|
if (heaps_saved) {
|
||||||
for (node = firstnode(heaps_saved); node; incnode(node)) {
|
for (node = firstnode(heaps_saved); node; incnode(node)) {
|
||||||
|
|
|
||||||
|
|
@ -2242,6 +2242,7 @@ load_module(char const *name, Feature_enables enablesarr, int silent)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (m->node.flags & MOD_BUSY) {
|
if (m->node.flags & MOD_BUSY) {
|
||||||
|
unqueue_signals();
|
||||||
zerr("circular dependencies for module ;%s", name);
|
zerr("circular dependencies for module ;%s", name);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2803,6 +2803,7 @@ assignsparam(char *s, char *val, int flags)
|
||||||
zerr("read-only variable: %s", v->pm->node.nam);
|
zerr("read-only variable: %s", v->pm->node.nam);
|
||||||
*ss = '[';
|
*ss = '[';
|
||||||
zsfree(val);
|
zsfree(val);
|
||||||
|
unqueue_signals();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
flags &= ~ASSPM_WARN_CREATE;
|
flags &= ~ASSPM_WARN_CREATE;
|
||||||
|
|
@ -3117,6 +3118,7 @@ setnparam(char *s, mnumber val)
|
||||||
if (!(v = getvalue(&vbuf, &t, 1))) {
|
if (!(v = getvalue(&vbuf, &t, 1))) {
|
||||||
DPUTS(!v, "BUG: value not found for new parameter");
|
DPUTS(!v, "BUG: value not found for new parameter");
|
||||||
/* errflag |= ERRFLAG_ERROR; */
|
/* errflag |= ERRFLAG_ERROR; */
|
||||||
|
unqueue_signals();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!was_unset && isset(WARNCREATEGLOBAL) && locallevel > forklevel)
|
if (!was_unset && isset(WARNCREATEGLOBAL) && locallevel > forklevel)
|
||||||
|
|
|
||||||
|
|
@ -491,8 +491,10 @@ putpromptchar(int doprint, int endchar, unsigned int *txtchangep)
|
||||||
if (!arg)
|
if (!arg)
|
||||||
arg++;
|
arg++;
|
||||||
queue_signals();
|
queue_signals();
|
||||||
if (!(hostnam = getsparam("HOST")))
|
if (!(hostnam = getsparam("HOST"))) {
|
||||||
|
unqueue_signals();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
if (arg < 0) {
|
if (arg < 0) {
|
||||||
for (ss = hostnam + strlen(hostnam); ss > hostnam; ss--)
|
for (ss = hostnam + strlen(hostnam); ss > hostnam; ss--)
|
||||||
if (ss[-1] == '.' && !++arg)
|
if (ss[-1] == '.' && !++arg)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue