[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Invoking multiple commands that use $? for function return status
From: |
fatiparty |
Subject: |
Invoking multiple commands that use $? for function return status |
Date: |
Wed, 1 Dec 2021 14:56:04 +0100 (CET) |
Dec 1, 2021, 13:49 by fxmbsw7@gmail.com:
> i dont understand you latter part, but maybe, 'saving $? after return to a
> var' does for you
>
Is there any possibility that the wrong exit code is returned if the same
function is called from a different terminal window. Are there any
possibilities of failure, perhaps on a different scenario?
>
> On Wed, Dec 1, 2021, 14:38 fatiparty--- via <help-bash@gnu.org> wrote:
>
>> I have been coding some bash functions that return an exit status. Then
>> calling $? to get the return value and act appropriately. But I am
>> suspecting problems when I invoke multiple instances of $? simultaneously
>> using different console terminals. I would be grateful on some ideas of
>> how to handle such circumstances.
>>