> I believe that Bash guarantees the trap will run once for every child that > exits, so it shoud be impossible for the count to become off. See: > https://lists.gnu.org/archive/html/bug-bash/2012-05/msg00055.html
I guess my question is "can more than one trap run simultaneously?" The more I think about it though, this is probably not possible. It looks like the trap doesn't run in a subprocess and I presume traps are blocked inside of other traps. > I think you might be experiencing other known bugs. Chet pushed several > wait/job related commits within the last few weeks. I haven't tested these > yet. http://git.savannah.gnu.org/cgit/bash.git/tree/CWRU/CWRU.chlog?h=devel Sorry, I should look before posting. I cloned the latest devel branch of bash and now I see the following occasionally but it may still be a work in progress. $ ./trap_race 4.2.37(3)-maint register_alloc: 0x9779a8 already in table as allocated? register_alloc: 0x979378 already in table as allocated? 100 Thanks, ------- Elliott Forney