|
| From: | Oğuz |
| Subject: | Re: Bug: Subshell won't continue after .-sourcing a file |
| Date: | Thu, 22 Dec 2022 06:44:47 +0200 |
22 Aralık 2022 Perşembe tarihinde Dan Church <h3xx@gmx.com> yazdı:
>
> 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.
>
Or
$ bash -c '(. <(echo ": && uname"); echo x)'
Linux
$
x is never printed. Looks like another bug caused by aggressive subshell
optimizations
--
Oğuz
| [Prev in Thread] | Current Thread | [Next in Thread] |