Hi!

I have definitely found a bug in bash. I have a git commit that adds a test for this already:

https://codeberg.org/h3xx/bash/commit/e573113317895072fd5c4641bf6d196875f5cc2d

After fixing the issue, I'd be glad if you would include my git commit as a way of crediting me with the discovery. *Please utilize git properly to do this* via either cherry-pick or merge; don't attribute my commit to your name. If you need help using git, I'd be happy to help you.

This bug was introduced in commit 74091dd4e8086db518b30df7f222691524469998 (found using git bisect). Unfortunately that commit contains way too many changes to pinpoint what change to what file broke it.

Repro:

   sub1=$(mktemp)
   sub2=$(mktemp)
   sub3=$(mktemp)

   echo '( echo "1st script executing" ; . '"$sub2"' ; echo "1st script still executing" )' 
>"$sub1"
   echo 'echo "2nd script starting" && ${THIS_SH} '"$sub3" >"$sub2"
   echo 'echo "3rd script starting"' >"$sub3"

   . "$sub1"

"1st script still executing" will never be printed.

I'm no C programmer or I'd fix this myself.

--

Regards,
Dan Church
🌎 web: h3xx.github.io <https://h3xx.github.io/>
"If I am to be judged by those who come after me, let me be judged for the truth." — Raistlin Majere

Reply via email to