Re: in-line calls to functions cause "exit" in the function to act like "return"

2021-12-19 Thread Chet Ramey
On 12/18/21 8:07 AM, yesxorno via Bug reports for the GNU Bourne Again SHell wrote: > When 'exit' is executed in a function called to "in-line" its output to > stdout, the 'exit' acts like return, leaving the function scope, but not > terminating the bash process. I assume by "in-line" you

Re: in-line calls to functions cause "exit" in the function to act like "return"

2021-12-18 Thread Alex fxmbsw7 Ratchev
x=$( exit 2 ) ; printf $?\\n On Sat, Dec 18, 2021, 17:03 Kerin Millar wrote: > On Sat, 18 Dec 2021 13:07:03 + > yesxorno via Bug reports for the GNU Bourne Again SHell > wrote: > > > Description: > > > > When 'exit' is executed in a function called to "in-line" its output to > stdout, the '

Re: in-line calls to functions cause "exit" in the function to act like "return"

2021-12-18 Thread Kerin Millar
On Sat, 18 Dec 2021 13:07:03 + yesxorno via Bug reports for the GNU Bourne Again SHell wrote: > Description: > > When 'exit' is executed in a function called to "in-line" its output to > stdout, the 'exit' acts like return, leaving the function scope, but not > terminating the bash proces

Re: in-line calls to functions cause "exit" in the function to act like "return"

2021-12-18 Thread Alex fxmbsw7 Ratchev
you execute it in a separate bash subshell via $( .. ) this code parsing layer u bring to exit On Sat, Dec 18, 2021, 16:50 yesxorno via Bug reports for the GNU Bourne Again SHell wrote: > (Composed using 'bashbug')

in-line calls to functions cause "exit" in the function to act like "return"

2021-12-18 Thread yesxorno via Bug reports for the GNU Bourne Again SHell
(Composed using 'bashbug')From: yesxo...@protonmail.ch To: bug-bash@gnu.org Subject: in-line calls to functions cause "exit" in the function to act like "return" Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Co