[5.1+] wait may return wrong status from function with EXIT trap

2022-02-08 Thread Greg Edwards
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O3 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -Wformat -Wformat-security -m64 -fasynchronous-unwind-tables -Wp,-D_REENTRANT

Re: [5.1+] wait may return wrong status from function with EXIT trap

2022-02-08 Thread Chet Ramey
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