On 5/21/19 12:51 AM, Hengyang Zhao wrote:
> Dear bash developers,
>
> I found an unexpected behavior when engineering some code in a callback of
> DEBUG trap. The code has been distilled to expose this behavior:
>
> ### BEGIN
> my_func() {
> local x=$(:)
> }
> trap my_func DEBUG
> false | true | false | true | false
> echo ${PIPESTATUS[@]}
> # expects 1 0 1 0 1
> # gets 0 0 0 0 1
> ### END
Thanks for the report. This appears to be a Linux-only problem (at least I
can't reproduce it on Mac OS X). I'll fix it for the next devel push.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/