summaryrefslogtreecommitdiff
path: root/Src/pattern.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2014-03-20 15:14:49 +0000
committerPeter Stephenson <pws@zsh.org>2014-03-20 15:14:49 +0000
commit9c3733e8f78e71e8847e78ac66d2389135f5785a (patch)
tree92c1c2a881c2a72147c0c6c118311ef49f9723a1 /Src/pattern.c
parent86873edea9861e1893bd3b48e2a949de6bf6b64f (diff)
parent8672d19f0c0f25569e233bbd466b6c39f60c7a55 (diff)
downloadzsh-9c3733e8f78e71e8847e78ac66d2389135f5785a.tar.gz
zsh-9c3733e8f78e71e8847e78ac66d2389135f5785a.zip
Merge branch 'master' of https://git.code.sf.net/p/zsh/code
Diffstat (limited to 'Src/pattern.c')
-rw-r--r--Src/pattern.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Src/pattern.c b/Src/pattern.c
index b79c3b444..94a299ebb 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -2223,6 +2223,8 @@ pattryrefs(Patprog prog, char *string, int stringlen, int unmetalen,
return ret;
} else {
+ int q = queue_signal_level();
+
/*
* Test for a `must match' string, unless we're scanning for a match
* in which case we don't need to do this each time.
@@ -2270,6 +2272,8 @@ pattryrefs(Patprog prog, char *string, int stringlen, int unmetalen,
patinput = patinstart;
+ dont_queue_signals();
+
if (patmatch((Upat)progstr)) {
/*
* we were lazy and didn't save the globflags if an exclusion
@@ -2406,6 +2410,8 @@ pattryrefs(Patprog prog, char *string, int stringlen, int unmetalen,
} else
ret = 0;
+ restore_queue_signals(q);
+
if (tryalloced)
zfree(tryalloced, unmetalen + unmetalenp);
@@ -2485,7 +2491,7 @@ patmatch(Upat prog)
zrange_t from, to, comp;
patint_t nextch;
- while (scan) {
+ while (scan && !errflag) {
next = PATNEXT(scan);
if (!globdots && P_NOTDOT(scan) && patinput == patinstart &&