bug-bash
[Top][All Lists]
Advanced

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

Re: coproc and existing variables


From: Chet Ramey
Subject: Re: coproc and existing variables
Date: Thu, 21 Apr 2016 10:22:01 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 4/21/16 12:36 AM, Grisha Levit wrote:
> A few issues inspired by the coproc proposal in this
> thread: http://lists.gnu.org/archive/html/bug-bash/2016-04/msg00050.html
> 
> 1. coproc unsets readonly NAME after the process completes

Yes.  This is a gray area.  Under some circumstances, e.g, getopts with
OPTARG, defined shell behavior can override a readonly setting.

> 
> 2. Segfault if NAME is an existing associative array

Thanks.  This is a general problem with converting between indexed and
associative arrays, but the fix is easy.


> 3. If NAME is $,?,@, etc, bash will create a new array variable with that
> name.  This zeroth index of this array variable will then take precedence
> over the real variable in some contexts

Yes, I applied a fix for this the other day as a result of Piotr's bug
report and submitted patch.

Chet


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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