On 5/23/16 12:45 PM, Grisha Levit wrote:
> On Thu, May 19, 2016 at 11:05 AM, Chet Ramey <chet.ra...@case.edu
> <mailto:chet.ra...@case.edu>> wrote:
> 
>     >       * The %s_PID variable is unbound unconditionally
>     >
>     > BTW, this is exploitable for unsetting read-only variables.
> 
>     Same change as for getopts.
> 
> This should probably instead be the same change as was previously done for
> unsetting the FD array variable, i.e.:

I disagree.  The idea is that by the time the coproc gets destroyed, the
xxx_PID variable had better be gone.  It's documented as being managed by
the coproc command, and if you choose to use it yourself, all bets are
off, similarly to how getopts manages $OPTARG.  The only question is
whether or not the coproc command should remove any existing variable
before binding it in the first place.

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

Reply via email to