bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [5.1+] wait <id> may return wrong status from function with EXIT tra


From: Chet Ramey
Subject: Re: [5.1+] wait <id> may return wrong status from function with EXIT trap
Date: Tue, 8 Feb 2022 15:57:23 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1

On 2/8/22 12:58 PM, Greg Edwards wrote:

Bash Version: 5.1
Patch Level: !PATCHLEVEL!
Release Status: release

Description:

The following simplified reproducer demonstrates an incorrect status being
returned from the test() function when run with bash 5.1 or above.  The correct
status is returned on bash versions 5.0 and below, though it doesn't appear to
run the trap.

Thanks for the report. It's an easy fix to make sure the correct status is
set before running the exit trap in this case.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]