bug-bash
[Top][All Lists]
Advanced

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

Re: issues in bash found while creating command result display


From: Paul Wise
Subject: Re: issues in bash found while creating command result display
Date: Tue, 16 Apr 2019 14:53:13 +0800
User-agent: Evolution 3.30.5-1

On Tue, 2019-04-16 at 12:38 +0700, Robert Elz wrote:

> That's really hard to do and do correctly.

I was operating on the assumption that it could be done in the same way
that the $? and $PIPESTATUS variables are created/updated.

> There's no way to pass variables back from a subshell

I think I would just ignore subshells since $PIPESTATUS is also not
passed back from subshells. So the variable I propose would be related
to the exit code of the subshell rather than anything it ran.

If one did want to add a way to pass back variables, since bash uses
itself for subshells (AFAICT), this feature could be added by using
creating a shared memory segment or a pipe or something and adding a
BASH_SUBSHELL_VARS environment variable that the subshell could use to
determine where to write the variables back to.

-- 
bye,
pabs

https://bonedaddy.net/pabs3/

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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