Re: Feature request: save/restore BASH_REMATCH across debug hook calls

2019-10-16 Thread Chet Ramey
On 10/16/19 1:34 PM, Rocky Bernstein wrote: > Current in bash 5.0 and earlier, the value of BASH_REMATCH might chanted > inside a debug hook. > > Since BASH_REMATCH is read-only, resetting the value on hook return to the > debugged program is a bit tricky and fragile... How about we just make it

Feature request: save/restore BASH_REMATCH across debug hook calls

2019-10-16 Thread Rocky Bernstein
Current in bash 5.0 and earlier, the value of BASH_REMATCH might chanted inside a debug hook. Since BASH_REMATCH is read-only, resetting the value on hook return to the debugged program is a bit tricky and fragile... There are way to change a bash readonly variable but that involve using either

Re: Signal ignore flags unexpectedly reset after "trap ... EXIT"

2019-10-16 Thread Chet Ramey
On 10/15/19 5:22 AM, Isaac To wrote: > Bash Version: 5.0 > Patch Level: 3 > Release Status: release > > Description: > > When trying to write a program and start it in an initrc script, I observed > a strange behavior: if a subshell is started by a subshell of that script, > and the inner subshe