diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-01-16 13:44:18 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-01-16 13:44:18 +0000 |
commit | 757168e2c8af374436108266cc3cfd32a946a590 (patch) | |
tree | 293929274f50de8733f00c4ae561a85e9c5fc16f /Src/Zle/compcore.c | |
parent | 052316fea3b74599de04fb3990a444b0ba08b04b (diff) | |
download | zsh-757168e2c8af374436108266cc3cfd32a946a590.tar.gz zsh-757168e2c8af374436108266cc3cfd32a946a590.tar.xz zsh-757168e2c8af374436108266cc3cfd32a946a590.zip |
remove 13108 (trap queues); replace with signal queueing to ensure that user signal handlers are only executed when it is safe to run them (13365)
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r-- | Src/Zle/compcore.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 06e7afbfb..a7ada2564 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -1526,14 +1526,15 @@ get_user_var(char *nam) /* Otherwise it should be a parameter name. */ char **arr = NULL, *val; + queue_signals(); if ((arr = getaparam(nam)) || (arr = gethparam(nam))) - return (incompfunc ? arrdup(arr) : arr); - - if ((val = getsparam(nam))) { + arr = (incompfunc ? arrdup(arr) : arr); + else if ((val = getsparam(nam))) { arr = (char **) zhalloc(2*sizeof(char *)); arr[0] = (incompfunc ? dupstring(val) : val); arr[1] = NULL; } + unqueue_signals(); return arr; } } @@ -1542,14 +1543,19 @@ static char ** get_data_arr(char *name, int keys) { struct value vbuf; + char **ret; Value v; + queue_signals(); if (!(v = fetchvalue(&vbuf, &name, 1, (keys ? SCANPM_WANTKEYS : SCANPM_WANTVALS) | SCANPM_MATCHMANY))) - return NULL; + ret = NULL; + else + ret = getarrvalue(v); + unqueue_signals(); - return getarrvalue(v); + return ret; } /* This is used by compadd to add a couple of matches. The arguments are |