Re: Pending signal in EXIT trap causes pattern matching to fail

2022-10-12 Thread Chet Ramey
On 10/12/22 11:23 AM, Andreas Schwab wrote: 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: OK. An interrupt or a terminating signal, yes. Since gmatch and

Pending signal in EXIT trap causes pattern matching to fail

2022-10-12 Thread Andreas Schwab
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

Re: pop_var_context msg when eval code with errexit set

2022-10-12 Thread Chet Ramey
On 10/12/22 12:58 AM, Xavier Delaruelle wrote: Bash Version: 5.2 Patch Level: 2 Release Status: release Description: Starting version 5.2, when evaluating bash code (with eval builtin command) with 'errexit' option set, a pop_var_context message appears if the evaluating code leads to an

Re: feature request: new builtin `defer`, scope delayed eval

2022-10-12 Thread Alex fxmbsw7 Ratchev
On Sat, Oct 8, 2022, 12:03 Oğuz wrote: > 8 Ekim 2022 Cumartesi tarihinde Cynthia Coan yazdı: > > > > [...] I think > > use cases outside of cleanup are relatively sparse, [...] > > > There. There already are several ways to do cleanup on exit/return using > existing features, why add one more?