bug-bash
[Top][All Lists]
Advanced

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

Re: «run_pending_traps: bad value in trap_list» when `jobs` is run a tra


From: Gioele Barabucci
Subject: Re: «run_pending_traps: bad value in trap_list» when `jobs` is run a trap
Date: Wed, 3 Jul 2024 20:14:11 +0200
User-agent: Mozilla Thunderbird

On 03/07/24 15:33, Chet Ramey wrote:
On 7/1/24 4:45 PM, Gioele Barabucci wrote:
the following script (reduced from <https://bugs.debian.org/417946>)

     #!/bin/bash
     childfinished () { echo "jobs: $(jobs)"; }
     trap childfinished SIGCHLD
     sleep 1 &
     wait

causes bash 5.2.21 to output

     ./par.sh: line 2: warning: run_pending_traps:
     bad value in trap_list[17]: 0x5625e6fa43d0

Does this warning hint at something like a dangling reference that should be fixed, or can it be safely ignored?

It's warning you that you're recursively calling the SIGCHLD trap handler.
It's clearer when the debugging messages are enabled:

Could the message be reworded to mention that explicitly?

line 2: warning: SIGCHLD trap handled called recursively

Regards,

--
Gioele Barabucci



reply via email to

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