bug-bash
[Top][All Lists]
Advanced

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

Re: Bug: Subshell won't continue after .-sourcing a file


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


reply via email to

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