gmatch in lib/glob/sm_loop.c returns FNM_NOMATCH when a signal is
pending.  This can cause spurious pattern matching failures if a SIGPIPE
is received while executing the EXIT trap:

$ cat trap.sh
trap 'set -x; echo trap; case a in *) echo match >&2;; esac; echo done >&2' EXIT
while :; do :; done
$ bash trap.sh | :
^C++ echo trap
trap.sh: line 1: echo: write error: Broken pipe
++ case a in
++ echo done
done

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Reply via email to