Hi,

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?

Modifying the trap to call `jobs` directly instead of in a subshell makes the warning go away.

Regards,

--
Gioele Barabucci

Reply via email to