[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Invoking multiple commands that use $? for function return status
From: |
Daniel Mills |
Subject: |
Re: Invoking multiple commands that use $? for function return status |
Date: |
Wed, 1 Dec 2021 11:06:07 -0500 |
On Wed, Dec 1, 2021 at 8:56 AM fatiparty--- via <help-bash@gnu.org> wrote:
>
> 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?
>
>
No. $? cannot get an exit status from another shell process. It will only
be for whatever is called immediately before using it in the current shell
process.