diff options
| author | Peter Stephenson <p.stephenson@samsung.com> | 2019-12-18 10:51:59 +0000 |
|---|---|---|
| committer | Peter Stephenson <p.stephenson@samsung.com> | 2019-12-18 10:51:59 +0000 |
| commit | fd068221b7fbbcfe89ec74c7eeb0138e90e14b13 (patch) | |
| tree | 545c04f2ae2071ec7559b10993ef66ceaabae6d5 /Src | |
| parent | 45076: internal: Simplify handling of try_tryflag. No functional change. (diff) | |
| download | zsh-fd068221b7fbbcfe89ec74c7eeb0138e90e14b13.tar zsh-fd068221b7fbbcfe89ec74c7eeb0138e90e14b13.tar.gz zsh-fd068221b7fbbcfe89ec74c7eeb0138e90e14b13.tar.bz2 zsh-fd068221b7fbbcfe89ec74c7eeb0138e90e14b13.tar.lz zsh-fd068221b7fbbcfe89ec74c7eeb0138e90e14b13.tar.xz zsh-fd068221b7fbbcfe89ec74c7eeb0138e90e14b13.tar.zst zsh-fd068221b7fbbcfe89ec74c7eeb0138e90e14b13.zip | |
45083: Add signal protection to execarith().
Otherwise we could get re-entrancy in memory functions when
setting variables.
Diffstat (limited to 'Src')
| -rw-r--r-- | Src/exec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c index 50027654a..fac095d64 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -5101,6 +5101,7 @@ execarith(Estate state, UNUSED(int do_exec)) mnumber val = zero_mnumber; int htok = 0; + queue_signals(); if (isset(XTRACE)) { printprompt4(); fprintf(xtrerr, "(("); @@ -5120,6 +5121,8 @@ execarith(Estate state, UNUSED(int do_exec)) fprintf(xtrerr, " ))\n"); fflush(xtrerr); } + unqueue_signals(); + if (errflag) { errflag &= ~ERRFLAG_ERROR; return 2; |
